-
-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add e2e testing support using Ava #303
Conversation
- [x] example based on https://nuxtjs.org/examples/testing/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only a tiny point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see some dir are test and others are tests, can me keep consistency?
the reason for that was the it could be |
The config file can be just in test root dir or each own test dir ? |
OK, according to the Ava docs
Hence the |
If so, can we only reserve ava.config.js and use process.env.TEST to apply different configurations? |
With dedicated config files. It'll be better to modify / update individual testing settings rather than have one huge Plus, that's how its recommended in Ava docs. |
If so, what the point for setting TEST for each script ? |
`cross-env` is required for two reasons:
1. avajs/ava#2112
2.
https://github.com/vinayakkulkarni/nuxt-ava-e2e-unit-testing/blob/master/test/_setup.js
Usually, the `ava.setup.js` differs for unit & e2e too.
…On Wed, Aug 7, 2019, 11:24 PM Xin Du (Clark) ***@***.***> wrote:
With dedicated config files. It'll be better to modify / update individual
testing settings rather than have one huge ava.config.js with if-else
checks.
Plus, that's how its recommended in Ava docs.
If so, what the point for setting TEST for each script ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#303?email_source=notifications&email_token=AEW4K3NTW4XKQSSYYU7FCRLQDMD5RA5CNFSM4IHMYC5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZGWQY#issuecomment-519203651>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEW4K3LBIIQSWVY4OCHRWDLQDMD5RANCNFSM4IHMYC5A>
.
|
Sorry for the mis-clicking, I just wondered that |
Isn't that a good thing? They could be used to setup a whole testing framework within the nuxt app if anyone wants to use it in that bifurcated way? Maybe using jest someone wants to do unit testing and using karma they want to do e2e testing and these two files could be modified for that purpose? |
This pr can be merged after resolving conflicts |
Thanks! |
This PR enables users to perform E2E testing the Nuxt app using Ava test runner.