Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Use node.js test runner #747

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ save-prefix=""
# These next two lines are the default in pnpm
public-hoist-pattern[]="*eslint*"
public-hoist-pattern[]="*prettier*"
# This is installed by jest
public-hoist-pattern[]="@jest/globals"
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ export default typescriptEslint.config(
{
files: ['**/*.js', '**/*.mjs', '**/*.ts'],
languageOptions: {
ecmaVersion: 2022,
ecmaVersion: 2024,
globals: {
...globals.node,
...globals.jest,
},
sourceType: 'module',
},
Expand All @@ -193,6 +192,7 @@ export default typescriptEslint.config(
{
files: ['**/__tests__/*.test.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'no-unused-expressions': 'off',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
"pretty": "prettier '**/*.{js,md,ts}' --write",
"pretty:ci": "prettier '**/*.{js,md,ts}' --check",
"release": "standard-version --infile docs/CHANGELOG.md",
"test": "jest",
"test": "node --experimental-test-module-mocks --import tsx --test **/__tests__/*.test.ts",
"test:build": "./tests/run.sh",
"test:types": "tsc",
"watch": "jest --watchAll",
"watch": "node --experimental-test-module-mocks --import tsx --watch --test **/__tests__/*.test.ts",
"watch:types": "tsc --watch"
},
"devDependencies": {
Expand All @@ -64,7 +64,7 @@
"@commitlint/config-conventional": "19.5.0",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.14.0",
"@types/node": "20.16.13",
"@types/node": "22.9.0",
"arg": "5.0.2",
"docsify-cli": "4.4.4",
"eslint": "9.14.0",
Expand All @@ -73,9 +73,8 @@
"eslint-plugin-import": "2.31.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-promise": "7.1.0",
"globals": "15.9.0",
"globals": "15.12.0",
"husky": "9.1.4",
"jest": "29.7.0",
"jsdoc-api": "9.3.4",
"jsdoc-parse": "6.2.4",
"lint-staged": "15.2.9",
Expand All @@ -87,6 +86,7 @@
"standard-version": "9.5.0",
"ts-expect": "1.3.0",
"ts-node": "10.9.2",
"tsx": "4.19.2",
"typescript": "5.6.2",
"typescript-eslint": "8.14.0"
},
Expand Down
Loading