Skip to content
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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
340 changes: 261 additions & 79 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/tools/dev-tool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
"@types/chai-as-promised": "^7.1.0",
"@types/fs-extra": "^9.0.13",
"@types/minimist": "~1.2.0",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/prettier": "^2.0.1",
"builtin-modules": "^3.1.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"eslint": "^7.15.0",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"rimraf": "^3.0.0",
"rollup": "^2.60.2",
"rollup-plugin-polyfill-node": "^0.8.0",
Expand Down
4 changes: 2 additions & 2 deletions common/tools/eslint-plugin-azure-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@
"@types/chai": "^4.1.6",
"@types/glob": "^7.1.1",
"@types/json-schema": "^7.0.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@typescript-eslint/eslint-plugin": "~4.19.0",
"@typescript-eslint/experimental-utils": "~4.19.0",
"@typescript-eslint/parser": "~4.19.0",
"chai": "^4.2.0",
"eslint": "^7.15.0",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
"source-map-support": "^0.5.9",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/abort-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reporter is removed?

"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"types": "./types/src/index.d.ts",
Expand Down Expand Up @@ -76,7 +76,7 @@
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
Expand All @@ -93,7 +93,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"prettier": "^2.5.1",
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/core-amqp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@rollup/plugin-replace": "^2.2.0",
"@types/chai": "^4.1.6",
"@types/debug": "^4.1.4",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"@types/ws": "^7.2.4",
Expand All @@ -105,7 +105,7 @@
"karma": "^6.2.0",
"karma-chrome-launcher": "^3.0.0",
"karma-mocha": "^2.0.1",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"prettier": "^2.5.1",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/core-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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": "echo skipped",
"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\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -70,14 +70,14 @@
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"downlevel-dts": "^0.8.0",
"eslint": "^7.15.0",
"inherits": "^2.0.3",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/core-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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": "cross-env TS_NODE_FILES=true mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test:node": "cross-env TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -79,7 +79,7 @@
"@azure/core-xml": "^1.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
Expand All @@ -100,7 +100,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/core-http-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test:node": "echo skipped",
"test": "npm run clean && npm run build && npm run unit-test:node && npm run unit-test:browser && npm run integration-test",
"unit-test:browser": "echo skipped",
"unit-test:node": "cross-env TS_NODE_FILES=true mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace \"test/**/*.spec.ts\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -64,7 +64,7 @@
"@azure/dev-tool": "^1.0.0",
"@microsoft/api-extractor": "7.18.11",
"mocha-junit-reporter": "^2.0.0",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"eslint": "^7.15.0",
"rimraf": "^3.0.0",
"downlevel-dts": "^0.8.0",
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/core-lro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"@azure/test-utils": "^1.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
Expand All @@ -119,7 +119,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"npm-run-all": "^4.1.5",
"nyc": "^15.0.0",
Expand Down
7 changes: 4 additions & 3 deletions sdk/core/core-paging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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 50000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"sideEffects": true,
Expand All @@ -75,9 +75,10 @@
"@microsoft/api-extractor": "7.18.11",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"downlevel-dts": "^0.8.0",
"eslint": "^7.15.0",
"karma": "^6.2.0",
Expand All @@ -91,7 +92,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/core-tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -65,7 +65,7 @@
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
Expand All @@ -82,7 +82,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/core-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -74,7 +74,7 @@
"@azure/dev-tool": "^1.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
Expand All @@ -94,7 +94,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/core-xml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"files": [
Expand Down Expand Up @@ -76,7 +76,7 @@
"@azure/dev-tool": "^1.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
Expand All @@ -96,7 +96,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions sdk/core/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"types": "./types/logger.d.ts",
Expand Down Expand Up @@ -74,7 +74,7 @@
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/chai": "^4.1.6",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"chai": "^4.2.0",
Expand All @@ -93,7 +93,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"mocha-junit-reporter": "^2.0.0",
"nyc": "^15.0.0",
"prettier": "^2.5.1",
Expand Down
6 changes: 3 additions & 3 deletions sdk/test-utils/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"lint": "eslint --no-eslintrc -c ../../.eslintrc.internal.json package.json src test --ext .ts",
"pack": "npm pack 2>&1",
"unit-test:browser": "cross-env karma start --single-run",
"unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 120000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"",
"unit-test:node": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 120000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"test:browser": "npm run clean && npm run build:test npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
Expand Down Expand Up @@ -66,14 +66,14 @@
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-exclude": "^2.1.0",
"mocha": "^7.1.1",
"mocha": "^9.2.0",
"tslib": "^2.2.0"
},
"devDependencies": {
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@microsoft/api-extractor": "7.18.11",
"@types/mocha": "^7.0.2",
"@types/mocha": "^9.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.4",
"cross-env": "^7.0.2",
Expand Down