Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

how to run a single test file? #1640

Open
nikitpatel24 opened this issue Nov 15, 2016 · 3 comments
Open

how to run a single test file? #1640

nikitpatel24 opened this issue Nov 15, 2016 · 3 comments

Comments

@nikitpatel24
Copy link

Is there any way where i could run a only a single test file for TDD development.
I can only run here npm tun test:client or npm run test:server ,These runs all the test cases. Is there a similar way to run a single test file.?

@simison
Copy link
Member

simison commented Nov 15, 2016

Nope, but you can first run all server tests and then leave it watching for changes — and when you edit a test file, it'll run only modified tests. If you then edit a regular app file, it'll run all the tests again.

npm run test:server:watch

If you need the same for client side tests, you can copy the task from our project: https://github.com/Trustroots/trustroots/blob/master/gulpfile.js#L393-L400

@hyperreality
Copy link
Contributor

hyperreality commented Nov 15, 2016

Actually, there is. Go to config/assets/test.js and edit an object value so it contains only the test file you want to run.

@shanavas786
Copy link
Contributor

You can use describe.only or it.only in test files to run a single/set of tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants