Skip to content

tests: switch test runner to mocha#3336

Merged
msimerson merged 5 commits intomasterfrom
nodeunit2mocha
Apr 28, 2024
Merged

tests: switch test runner to mocha#3336
msimerson merged 5 commits intomasterfrom
nodeunit2mocha

Conversation

@msimerson
Copy link
Copy Markdown
Member

@msimerson msimerson commented Apr 26, 2024

  • nodeunit was deprecated 6 years ago
  • a few years back, I switched us to the somewhat maintained nodeunit-x
  • the history: nodeunit -> expresso -> mocha
  • I use mocha and node --test everywhere else
  • I still prefer mocha (node --test has sharp edges) but I expect the future is inevitably node --test.
  • this PR has 98% of the changes (using the built-in assert module) needed to use node --test.
    • The first showstopper I encountered was test/server.js doesn't exit. I found (with wtfnode) one setInterval that needed to be unref'ed. There's nothing still listening, so that one requires a deeper dive.
  • test: install deps with --omit=optional (go faster)
  • tests: lots of cleanups for es6 & brevity

Checklist:

  • docs updated
  • tests updated
  • Changes updated

@msimerson msimerson force-pushed the nodeunit2mocha branch 3 times, most recently from b21dea5 to 0bb6b54 Compare April 26, 2024 20:50
@msimerson msimerson changed the title Nodeunit2mocha tests: switch test runner to mocha Apr 26, 2024
- outbound/timer_queue: unref the setInterval
- update test run scripts
- run_tests: restore ability to test one module
- bump haraka-config version
@msimerson msimerson marked this pull request as ready for review April 27, 2024 00:11
@msimerson msimerson merged commit a9e58a1 into master Apr 28, 2024
@msimerson msimerson deleted the nodeunit2mocha branch April 28, 2024 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant