-
Notifications
You must be signed in to change notification settings - Fork 22
test: replace mocha with node:test #499
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
test: replace mocha with node:test #499
Conversation
This PR replaces mocha with the Node.js native test runner[^1]. [^1]: https://nodejs.org/api/test.html
|
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: @types/chai@4.3.5, @types/mocha@10.0.1, chai@4.3.7, mocha@10.2.0, ts-node@10.9.1 |
bitgopatmcl
left a comment
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.
Tested and it works 🎉 . Is the main change in the superagent-wrapper tests to instantiate a server in the before block of each section with a hardcoded port, or did I miss something else?
| res.send(response); | ||
| } | ||
| }); | ||
| const createTestServer = (port: number) => { |
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.
If the port is hardcoded per-test now, do we even need supertest? Or can we just use express and superagent directly?
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.
Ah right, supertest also provides some extra functionality on the request object
That's the gist of it! |
|
🎉 This PR is included in version @api-ts/express-wrapper@1.0.20 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/openapi-generator@2.0.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/typed-express-router@1.1.1 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/superagent-wrapper@1.1.12 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/io-ts-http@2.4.1-beta.1 🎉 The release is available on Your semantic-release bot 📦🚀 |
This PR replaces mocha with the Node.js native test runner1.
Footnotes
https://nodejs.org/api/test.html ↩