Skip to content

Commit

Permalink
chore: configure mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Oct 8, 2023
1 parent 7f27e5b commit ac75b9c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const path = require("node:path")

process.env.TS_NODE_PROJECT = path.resolve(__dirname, 'tsconfig.test.json')

window = {}

module.exports = {
extension: [ 'ts', 'tsx' ],
require: [
// 'tsconfig-paths/register',
'esbuild-register'
// 'jsdom-global/register'
]
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,29 @@
"@babel/helper-plugin-utils": "^7.22.5",
"@power-playground/core": "workspace:*",
"@types/babel__helper-plugin-utils": "^7.10.0",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.2",
"@types/node": "^18.16.20",
"@types/ramda": "^0.29.3",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.6",
"@types/chai": "^4.3.6",
"@types/mocha": "^10.0.2",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-react": "^4.0.4",
"@vscode/codicons": "^0.0.33",
"chai": "^4.3.10",
"dotenv": "^16.3.1",
"esbuild-register": "^3.5.0",
"eslint": "^8.44.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"eslint-plugin-simple-import-sort": "^10.0.0",
"fast-glob": "^3.3.1",
"mocha": "^10.2.0",
"ramda": "^0.29.0",
"react-toastify": "^9.1.3",
"rollup-plugin-visualizer": "^5.9.2",
"chai": "^4.3.10",
"mocha": "^10.2.0",
"sass": "^1.64.0",
"sentinel-js": "^0.0.7",
"typescript": "^5.3.0-beta",
Expand Down
14 changes: 14 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"resolveJsonModule": true
}
}

0 comments on commit ac75b9c

Please sign in to comment.