Skip to content

Commit

Permalink
test: switch to node.js test runner
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
Jérôme Benoit committed Sep 29, 2023
1 parent b2c0174 commit 6c43b44
Show file tree
Hide file tree
Showing 14 changed files with 332 additions and 603 deletions.
1 change: 0 additions & 1 deletion .cfignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
.nycrc.json
.nyc_output
.reuse
.mocharc.json
.release-it.json
.xmake.cfg
# Logs
Expand Down
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"root": true,
"env": {
"es2022": true,
"node": true,
"mocha": true
"node": true
},
"parserOptions": {
"ecmaVersion": 2022,
Expand Down
22 changes: 0 additions & 22 deletions .mocharc.json

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"hbenl.vscode-mocha-test-adapter",
"ms-azuretools.vscode-docker",
"sonarsource.sonarlint-vscode",
"streetsidesoftware.code-spell-checker"
Expand Down
5 changes: 1 addition & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"continueOnAttach": true,
"autoAttachChildProcesses": false,
"timeout": 30000,
"resolveSourceMapLocations": [
"!**/node_modules/**",
"!**/.vscode/extensions/hbenl.vscode-mocha-test-adapter-*/**"
],
"resolveSourceMapLocations": ["!**/node_modules/**"],
"skipFiles": ["<node_internals>/**"]
}
]
Expand Down
9 changes: 0 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
"source.fixAll": true
},
"testExplorer.useNativeTesting": true,
"mochaExplorer.nodeArgv": [
"--loader=ts-node/esm",
"--no-warnings=ExperimentalWarning",
"--experimental-specifier-resolution=node"
],
"mochaExplorer.files": ["test/**/*.test.ts"],
"mochaExplorer.debuggerConfig": "Debug Simulator Unit Tests",
"cSpell.words": [
"backoff",
"benoit",
Expand Down Expand Up @@ -38,7 +31,6 @@
"measurands",
"mikro",
"mnemonist",
"mochawesome",
"ocpp",
"olivierbagot",
"parens",
Expand All @@ -47,7 +39,6 @@
"preinstall",
"Recurrency",
"RFID",
"robohydra",
"shutdowning",
"sonarlint",
"SRPC",
Expand Down
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,11 @@
"lint": "cross-env TIMING=1 eslint --cache src",
"lint:fix": "cross-env TIMING=1 eslint --cache --fix src",
"format": "prettier --cache --write .",
"test": "c8 mocha test/**/*.test.ts",
"test:debug": "mocha --no-parallel --inspect test/**/*.test.ts",
"test": "c8 node --loader tsx --no-warnings=ExperimentalWarning --test test/**/*.test.ts",
"test:debug": "node --loader tsx --no-warnings=ExperimentalWarning --test --inspect test/**/*.test.ts",
"coverage": "c8 report --reporter=lcov",
"coverage:html": "c8 report --reporter=html",
"clinic:clean": "clinic clean",
"robohydra": "robohydra test/robohydra/config.json",
"git:sinit": "git submodule update --init --recursive --force",
"git:sdiff": "git diff && git submodule foreach 'git diff'",
"git:supdate": "git submodule update --remote --recursive --merge",
Expand Down Expand Up @@ -133,7 +132,6 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.4",
"@types/mocha": "^10.0.2",
"@types/node": "^20.7.1",
"@types/sinon": "^10.0.17",
"@types/tar": "^6.1.6",
Expand All @@ -156,18 +154,15 @@
"expect": "^29.7.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"mocha": "^10.2.0",
"mochawesome": "^7.1.3",
"prettier": "^3.0.3",
"release-it": "^16.2.1",
"rimraf": "^5.0.5",
"robohydra": "^0.6.9",
"rollup": "^3.29.4",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-delete": "^2.0.0",
"semver": "^7.5.4",
"sinon": "^16.0.0",
"ts-node": "^10.9.1",
"tsx": "^3.13.0",
"typescript": "~5.2.2"
}
}
Loading

0 comments on commit 6c43b44

Please sign in to comment.