Nuxt.js: Integration with Nightwatch and CircleCI using Nuxt module

Created on 8 Jun 2017  路  6Comments  路  Source: nuxt/nuxt.js

Any help related to setting up with Nightwatch would be awesome. Currently, we use ava + jsdom which is mentioned in Nuxt docs. I found these docs as initial starting point but think that will it be good use case for extracting it out to Nuxt modules ?

  1. https://vuejs-templates.github.io/webpack/e2e.html
  2. https://www.browserstack.com/automate/nightwatch
  3. https://www.browserstack.com/automate/nightwatch-integration

This question is available on Nuxt.js community (#c734)
help-wanted

Most helpful comment

Glad I could help! @piyushchauhan2011

Yes, nyc is not ran on the nightwatch tests since I don't want to get the coverage on my vue components for now.

The output you see is the output of my api tests hence there are only js files and actually was not using nightwatch.

You should try running npm run test:front to see nightwatch in action. It does not show the code coverage on this though...

All 6 comments

Hi @piyushchauhan2011

Actually jsdom is only a first solution for testing with Nuxt.js, I did not try with others frameworks.

We planned after 1.0 stable to work on a way of testing Nuxt.js application them most efficient way possible :+1:

I have no clue if that can help but I managed to get nightwatch working on my project which you can find here.

_Don't mind the electron part, it is just a wrapper to have a desktop app. It works in the browser just like a normal web project too._

Hey @Kylart Awesome job at doing an integration of electron + nightwatch + nuxtjs app . I looked at the coverage by running npm run test:server.

It outputs something like this:
screen shot 2017-06-15 at 7 03 21 pm

If we cd coverage it remains empty after running npm run coverage. I was looking for test coverage related to store and UI .vue components.

In the other project, which is here https://github.com/eddyerburgh/avoriaz-ava-example
if we run npm test we can see the coverage includes the .vue files. Obviously .spec.js files should not be included 馃槃 But it explains the point

screen shot 2017-06-15 at 7 06 07 pm

Maybe I'm missing something @Kylart

The example of KawAnime solves the Nightwatch problem hence seems a good idea to close the issue. Cheers @Kylart

Glad I could help! @piyushchauhan2011

Yes, nyc is not ran on the nightwatch tests since I don't want to get the coverage on my vue components for now.

The output you see is the output of my api tests hence there are only js files and actually was not using nightwatch.

You should try running npm run test:front to see nightwatch in action. It does not show the code coverage on this though...

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gary149 picture gary149  路  3Comments

surmon-china picture surmon-china  路  3Comments

maicong picture maicong  路  3Comments

jaredreich picture jaredreich  路  3Comments

bimohxh picture bimohxh  路  3Comments