Skip to content

Commit

Permalink
[EngSys] back to use nyc for code coverage
Browse files Browse the repository at this point in the history
now that we removed `esm` dependency, `nyc` should be working again, and `nyc`
appears to have better results than `c8` does.

***NO_CI***
  • Loading branch information
jeremymeng committed Apr 19, 2024
1 parent 224f7c1 commit e9561c1
Show file tree
Hide file tree
Showing 106 changed files with 379 additions and 275 deletions.
444 changes: 274 additions & 170 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/tools/dev-tool/src/commands/run/testNodeJSInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default leafCommand(commandInfo, async (options) => {
? updatedArgs.join(" ")
: '--timeout 5000000 "dist-esm/test/{,!(browser)/**/}/*.spec.js"';
const command = {
command: `c8 mocha --require tsx ${defaultMochaArgs} ${mochaArgs}`,
command: `nyc mocha --require tsx ${defaultMochaArgs} ${mochaArgs}`,
name: "node-tests",
};

Expand Down
2 changes: 1 addition & 1 deletion sdk/agrifood/agrifood-farming-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"karma": "^6.2.0",
"mkdirp": "^3.0.1",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/anomalydetector/ai-anomaly-detector-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"csv-parse": "^5.0.3",
"ts-node": "^10.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"eslint": "^8.0.0",
"magic-string": "~0.27.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"ts-node": "^10.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/appconfiguration/app-configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"@types/sinon": "^17.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"chai": "^4.2.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/appservice/arm-appservice-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/attestation/attestation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"safe-buffer": "^5.2.1",
"source-map-support": "^0.5.9",
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@types/url-parse": "^1.4.3",
"@types/uuid": "^8.3.1",
"buffer": "^6.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma-source-map-support": "~1.4.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"sinon": "^17.0.0",
"source-map-support": "^0.5.9",
"ts-node": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/cognitivelanguage/ai-language-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma-source-map-support": "~1.4.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"source-map-support": "^0.5.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/test-utils": "^1.0.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-alpha-ids/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"ts-node": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"typescript": "~5.4.5",
"rimraf": "^5.0.5",
"ts-node": "^10.0.0"
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"process": "^0.11.10",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@microsoft/api-extractor": "^7.31.1",
"autorest": "latest",
"@types/node": "^18.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"mkdirp": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-job-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-messages-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.4.0",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/communication/communication-messages-rest-rest/README.md",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-phone-numbers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-rooms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"karma-env-preprocessor": "^0.1.1",
"mkdirp": "^3.0.1",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-short-codes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/communication-tiering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/compute/arm-compute-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"@azure/arm-network": "^32.2.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/containerregistry/container-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"typescript": "~5.4.5",
"util": "^0.12.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0",
"@types/mocha": "^10.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/contentsafety/ai-content-safety-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.4.0",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0",
"@azure/core-util": "^1.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/core/core-amqp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"karma-chrome-launcher": "^3.0.0",
"karma-mocha": "^2.0.1",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"puppeteer": "^22.2.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/devcenter/developer-devcenter-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.4.0",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0"
},
"//metadata": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/deviceupdate/iot-device-update-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"@types/chai": "^4.1.6",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"dotenv": "^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/digitaltwins/digital-twins-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
"typescript": "~5.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma-source-map-support": "~1.4.0",
"karma-sourcemap-loader": "^0.4.0",
"karma": "^6.2.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"ts-node": "^10.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/documentintelligence/ai-document-intelligence-rest/README.md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"karma-sourcemap-loader": "^0.3.8",
"karma": "^6.2.0",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/easm/defender-easm-rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"karma": "^6.2.0",
"mkdirp": "^3.0.1",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/entra/functions-authentication-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"source-map-support": "^0.5.9",
"typescript": "~5.4.5",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventgrid/eventgrid-namespaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventgrid/eventgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"@types/node": "^18.0.0",
"@types/sinon": "^17.0.0",
"@types/uuid": "^8.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.2",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"moment": "^2.24.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"puppeteer": "^22.2.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/eventhubs-checkpointstore-blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"mocha": "^10.0.0",
"c8": "^9.1.0",
"nyc": "^15.1.0",
"rimraf": "^5.0.5",
"ts-node": "^10.0.0",
"typescript": "~5.4.5",
Expand Down
Loading

0 comments on commit e9561c1

Please sign in to comment.