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

chore: drop ts-mocha for mocha and ts-node #4840

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
working-directory: ./api
run: |
npm install --ignore-scripts
npm install @types/mocha@^7 mocha@^7 ts-loader@^8 ts-mocha@^8
npm install @types/mocha@^7 mocha@^7 ts-loader@^8
node ../scripts/version-update.js
npx tsc --build tsconfig.json tsconfig.esm.json

Expand Down
1 change: 1 addition & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require: 'ts-node/register'
5 changes: 2 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"lint:fix": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts",
"test:browser": "karma start --single-run",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test:eol": "ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"test:eol": "mocha 'test/**/*.test.ts'",
"test:webworker": "karma start karma.worker.js --single-run",
"cycle-check": "dpdm --exit-code circular:1 src/index.ts",
"version": "node ../scripts/version-update.js",
Expand Down Expand Up @@ -102,7 +102,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"unionfs": "4.5.4",
"webpack": "5.89.0"
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepublishOnly": "npm run compile",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "nyc mocha test/**/*.test.ts",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -82,7 +82,6 @@
"mocha": "10.2.0",
"nyc": "15.1.0",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0"
},
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/api-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "nyc mocha test/**/*.test.ts",
"test:browser": "karma start --single-run",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
Expand Down Expand Up @@ -81,7 +81,6 @@
"mocha": "10.2.0",
"nyc": "15.1.0",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --watch --build",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down Expand Up @@ -65,7 +65,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -95,7 +95,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -84,7 +84,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --watch --build",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down Expand Up @@ -62,7 +62,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -86,7 +86,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -83,7 +83,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"test:browser": "karma start --single-run",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
Expand Down Expand Up @@ -74,7 +74,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc -w",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down Expand Up @@ -61,7 +61,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -86,7 +86,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down Expand Up @@ -67,7 +67,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"tdd": "npm run test -- --watch-extensions ts --watch",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"lint": "eslint . --ext .ts",
Expand Down Expand Up @@ -55,7 +55,6 @@
"mocha": "10.2.0",
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "npm run protos:generate && nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "npm run protos:generate && nyc mocha test/**/*.test.ts",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
Expand Down Expand Up @@ -69,7 +69,6 @@
"nyc": "15.1.0",
"semver": "7.5.4",
"sinon": "15.1.2",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "nyc mocha test/**/*.test.ts",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
Expand Down Expand Up @@ -69,7 +69,6 @@
"request-promise-native": "1.0.9",
"sinon": "15.1.2",
"superagent": "9.0.2",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"tdd": "npm run tdd:node",
"tdd:node": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test:cjs": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:cjs": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:esm": "nyc node --experimental-loader=./hook.mjs ../../../node_modules/mocha/bin/mocha 'test/node/*.test.mjs' test/node/*.test.mjs",
"test": "npm run test:cjs && npm run test:esm",
"test:browser": "karma start --single-run",
Expand Down Expand Up @@ -108,7 +108,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/opentelemetry-sdk-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test": "nyc mocha test/**/*.test.ts",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
Expand Down Expand Up @@ -78,7 +78,6 @@
"semver": "7.5.4",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-sdk-node",
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/otlp-exporter-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"tdd:browser": "karma start",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test": "nyc mocha 'test/**/*.test.ts' --exclude 'test/browser/**/*.ts'",
"test:browser": "karma start --single-run",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
Expand Down Expand Up @@ -86,7 +86,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc -w",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
Expand Down Expand Up @@ -60,7 +60,6 @@
"nyc": "15.1.0",
"sinon": "15.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4"
},
"peerDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions experimental/packages/otlp-transformer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:fix": "eslint . --ext .ts --fix",
"tdd": "npm run test -- --watch-extensions ts --watch",
"submodule": "git submodule sync --recursive && git submodule update --init --recursive",
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'",
"test": "nyc mocha 'test/**/*.test.ts'",
"test:browser": "karma start --single-run",
"test:bench": "node test/performance/benchmark/index.js | tee .benchmark-results.txt",
"prewatch": "node ../../../scripts/version-update.js",
Expand Down Expand Up @@ -79,7 +79,6 @@
"nyc": "15.1.0",
"protobufjs-cli": "1.1.2",
"ts-loader": "9.5.1",
"ts-mocha": "10.0.0",
"typescript": "4.4.4",
"webpack": "5.89.0"
},
Expand Down
Loading