-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[engsys] upgrade mocha to v9 for some core libraries #21696
Conversation
- mocha to ^9.2.0 and @types/mocha to ^9.0.0 Currently ts-node doesn't support ESM. It's recommended to set ``` TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' ``` See details at https://github.com/mochajs/mocha-examples/blob/443a3e3b3591206b94fabc55739cc384f39d13f6/packages/typescript/README.md#es-modules
I thought the |
It didn't work for me. It looks that we need to either use |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
API change check for API changes are not detected in this pull request for |
It is also possible to specify the loader option in mocharc: mochajs/mocha#4726 (comment) |
set to draft mode. This fails on node 12 (and 17) |
@@ -26,7 +26,7 @@ | |||
"test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node", | |||
"test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", | |||
"unit-test:browser": "karma start --single-run", | |||
"unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", |
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.
reporter is removed?
Looks like windows doesn't like these updates? |
Not sure if it's helpful or not but I was able to get mocha to work with native ESM support here: I didn't know before but you can put mocha config into package.json to avoid having a long commandline in your npm script. Also |
Nice to know! I think it may be better if we can re-use some centralized mocha config or shared command-line via dev-tool, so we can reduce code churn for every package in the future when we need to adjust the settings. |
Hi @jeremymeng. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @jeremymeng. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
Currently ts-node doesn't support ESM. It's recommended to set
See details at https://github.com/mochajs/mocha-examples/blob/443a3e3b3591206b94fabc55739cc384f39d13f6/packages/typescript/README.md#es-modules