Skip to content

Conversation

@ericcrosson-bitgo
Copy link
Contributor

This PR replaces mocha with the Node.js native test runner1.

Footnotes

  1. https://nodejs.org/api/test.html

This PR replaces mocha with the Node.js native test runner[^1].

[^1]: https://nodejs.org/api/test.html
@ericcrosson-bitgo ericcrosson-bitgo requested a review from a team as a code owner August 2, 2023 23:25
@socket-security
Copy link

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

Copy link
Contributor

@bitgopatmcl bitgopatmcl left a 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) => {
Copy link
Contributor

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?

Copy link
Contributor

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

@ericcrosson-bitgo ericcrosson-bitgo merged commit b65132e into BitGo:master Aug 3, 2023
@ericcrosson-bitgo
Copy link
Contributor Author

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?

That's the gist of it!

@ericcrosson-bitgo ericcrosson-bitgo deleted the replace-mocha-with-node-test branch August 3, 2023 01:33
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

🎉 This PR is included in version @api-ts/io-ts-http@2.4.1-beta.1 🎉

The release is available on @api-ts/io-ts-http

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants