Skip to content

Good testing setup with Mocha? #584

Answered by hasezoey
Nikola-Milovic asked this question in Q&A
Discussion options

You must be logged in to vote

i dont quite know you specifications, but there is Integration with Test Runners: Mocha / chai, which may be outdated, because we (maintainers) dont really use mocha / chai anymore, but there is a Integration with Test Runners: jest which is up-to-date

Do you setup your server once before all tests or before each test/ test block?

this depends on what you want from your tests:

  • Do you want Fast tests (and dont care about carrying data over to other tests / test suites)? then, a global instance should be used
  • Do you want Accurate tests (and care about carrying data over to other tests / test suites)? then a instance for each test suite (or test) should be used (but is way slower)

i pers…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nikola-Milovic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants