Skip to content

Commit 8833137

Browse files
meta: use ts-mocha for testing
1 parent ea022e1 commit 8833137

File tree

3 files changed

+164
-26
lines changed

3 files changed

+164
-26
lines changed

Diff for: .mocharc.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"extension": ["ts"],
3+
"loader": "ts-node/esm",
34
"spec": "test/**/*.spec.ts",
4-
"node-option": [
5-
"experimental-specifier-resolution=node",
6-
"loader=ts-node/esm"
7-
],
85
"recursive": true
96
}

Diff for: package-lock.json

+160-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626
},
2727
"scripts": {
28-
"test": "cross-env TS_NODE_PROJECT='./configs/tsconfig.cjs.json' mocha",
28+
"test": "ts-mocha src/**/*.spec.ts",
2929
"clean": "rm -rf ./dist",
3030
"build": "npm run clean && pkgroll --src source/ && cp source/migrations/ dist/ -r && npm run mjs-fix-prepend",
3131
"lint": "prettier --check .",
@@ -69,15 +69,14 @@
6969
"postgres-migrations": "5.3.0"
7070
},
7171
"devDependencies": {
72-
"express-rate-limit": "7.0.1",
7372
"@express-rate-limit/prettier": "1.1.1",
7473
"@express-rate-limit/tsconfig": "1.0.2",
7574
"@types/chai": "4.3.6",
7675
"@types/express": "4.17.17",
7776
"@types/mocha": "10.0.1",
7877
"@types/sinon": "10.0.16",
7978
"chai": "4.3.8",
80-
"cross-env": "7.0.3",
79+
"express-rate-limit": "7.0.1",
8180
"global-jsdom": "9.1.0",
8281
"husky": "8.0.3",
8382
"license-checker-rseidelsohn": "4.2.7",
@@ -86,6 +85,7 @@
8685
"pkgroll": "1.11.0",
8786
"prettier": "3.0.3",
8887
"sinon": "16.0.0",
88+
"ts-mocha": "10.0.0",
8989
"ts-node": "10.9.1",
9090
"typescript": "5.2.2"
9191
},

0 commit comments

Comments
 (0)