Skip to content
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

Why are Mocha tests each run as a separate suite? #1157

Closed
ozyx opened this issue Jul 22, 2016 · 1 comment
Closed

Why are Mocha tests each run as a separate suite? #1157

ozyx opened this issue Jul 22, 2016 · 1 comment

Comments

@ozyx
Copy link
Contributor

ozyx commented Jul 22, 2016

I have multiple Mocha test suites in the same NTVS project. When I run the tests in this project from Test Explorer by right clicking and selecting 'Run All Tests', each test is run as its own test suite. Is this by design or is there a way to control how VS runs the test? This same behavior occurs when running the tests as part of a TFS build.

Please let me know if you need me to elaborate on anything.
Thanks!

Expected Behavior

before()
run test 1
run test 2
run test 3
after()

Actual Behavior

before()
run test 1
after()
before()
run test 2
after()
before()
run test 3
after()

  • NTVS Version: 1.1
  • Visual Studio Version: 2013 Professional Update 5
  • Node.js Version: 4.4.7
Steps to Reproduce
  1. Create simple Mocha test suite with multiple tests and before() and after()
  2. Right click on project in Test Explorer and select 'Run All Tests'
  3. Observer that before() and after() are called for each test
@mjbvz
Copy link
Contributor

mjbvz commented Jul 25, 2016

Thanks for the report. This is a known issue and being tracked by #518

The root cause is that we spin up a separate instance of node for each test, which causes the multiple calls to before, as well as major perf problems. Please let me know if you would like some pointers or any help investigating a fix.

Closing as dup of #518

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

No branches or pull requests

2 participants