Skip to content

Commit 1045c06

Browse files
authored
test: Use node.js test runner (#747)
1 parent d229f4c commit 1045c06

19 files changed

+1354
-2428
lines changed

.npmrc

-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ save-prefix=""
77
# These next two lines are the default in pnpm
88
public-hoist-pattern[]="*eslint*"
99
public-hoist-pattern[]="*prettier*"
10-
# This is installed by jest
11-
public-hoist-pattern[]="@jest/globals"

eslint.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,9 @@ export default typescriptEslint.config(
176176
{
177177
files: ['**/*.js', '**/*.mjs', '**/*.ts'],
178178
languageOptions: {
179-
ecmaVersion: 2022,
179+
ecmaVersion: 2024,
180180
globals: {
181181
...globals.node,
182-
...globals.jest,
183182
},
184183
sourceType: 'module',
185184
},
@@ -193,6 +192,7 @@ export default typescriptEslint.config(
193192
{
194193
files: ['**/__tests__/*.test.ts'],
195194
rules: {
195+
'@typescript-eslint/no-floating-promises': 'off',
196196
'@typescript-eslint/no-unused-expressions': 'off',
197197
'@typescript-eslint/unbound-method': 'off',
198198
'no-unused-expressions': 'off',

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
"pretty": "prettier '**/*.{js,md,ts}' --write",
5151
"pretty:ci": "prettier '**/*.{js,md,ts}' --check",
5252
"release": "standard-version --infile docs/CHANGELOG.md",
53-
"test": "jest",
53+
"test": "node --experimental-test-module-mocks --import tsx --test **/__tests__/*.test.ts",
5454
"test:build": "./tests/run.sh",
5555
"test:types": "tsc",
56-
"watch": "jest --watchAll",
56+
"watch": "node --experimental-test-module-mocks --import tsx --watch --test **/__tests__/*.test.ts",
5757
"watch:types": "tsc --watch"
5858
},
5959
"devDependencies": {
@@ -64,7 +64,7 @@
6464
"@commitlint/config-conventional": "19.6.0",
6565
"@eslint/eslintrc": "3.2.0",
6666
"@eslint/js": "9.17.0",
67-
"@types/node": "20.16.13",
67+
"@types/node": "22.10.6",
6868
"arg": "5.0.2",
6969
"docsify-cli": "4.4.4",
7070
"eslint": "9.17.0",
@@ -73,9 +73,8 @@
7373
"eslint-plugin-import": "2.31.0",
7474
"eslint-plugin-prettier": "5.2.1",
7575
"eslint-plugin-promise": "7.1.0",
76-
"globals": "15.9.0",
76+
"globals": "15.12.0",
7777
"husky": "9.1.4",
78-
"jest": "29.7.0",
7978
"jsdoc-api": "9.3.4",
8079
"jsdoc-parse": "6.2.4",
8180
"lint-staged": "15.2.9",
@@ -87,6 +86,7 @@
8786
"standard-version": "9.5.0",
8887
"ts-expect": "1.3.0",
8988
"ts-node": "10.9.2",
89+
"tsx": "4.19.2",
9090
"typescript": "5.6.3",
9191
"typescript-eslint": "8.19.1"
9292
},

0 commit comments

Comments
 (0)