diff --git a/.mocharc.cjs b/.mocharc.cjs new file mode 100644 index 0000000..c9bc100 --- /dev/null +++ b/.mocharc.cjs @@ -0,0 +1,6 @@ +process.env.TS_NODE_PROJECT = process.env.TS_NODE_PROJECT || require('path').join(__dirname, 'test/tsconfig.json'); + +module.exports = { + require: ['ts-node/register'], + extensions: ['ts'], +}; diff --git a/package.json b/package.json index 9e12d40..018a567 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "scripts": { "prepublishOnly": "yarn prettier:lint && yarn build && yarn test:integration", - "test": "ts-mocha --recursive test/**/*.spec.ts", + "test": "mocha --recursive 'test/**/*.spec.ts'", "test:integration": "node test/integration/esm.mjs && node test/integration/cjs.cjs", "coverage": "nyc yarn test", "build:esm": "tsc --project tsconfig.esm.json && node -e \"require('fs').writeFileSync('dist/esm/package.json', JSON.stringify({type:'module'}))\"", @@ -48,7 +48,6 @@ "nyc": "18.0.0", "prettier": "3.8.3", "source-map-support": "0.5.21", - "ts-mocha": "11.1.0", "ts-node": "10.9.2", "typescript": "6.0.3" },