Skip to content

Commit 6f5eaca

Browse files
committed
feat: migration to ESM
1 parent 64af933 commit 6f5eaca

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"message": "Use `globalThis` instead"
3939
}
4040
],
41+
"prefer-rest-params": 0,
4142
"require-yield": 0,
4243
"eqeqeq": ["error", "smart"],
4344
"spaced-comment": [

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"resource-counter": "^1.2.4"
4141
},
4242
"devDependencies": {
43-
"@fast-check/jest": "^1.8.1",
43+
"@fast-check/jest": "^2.1.0",
4444
"@swc/core": "1.3.82",
4545
"@swc/jest": "^0.2.29",
4646
"@types/jest": "^29.5.2",
@@ -53,7 +53,7 @@
5353
"eslint-config-prettier": "^8.8.0",
5454
"eslint-plugin-import": "^2.27.5",
5555
"eslint-plugin-prettier": "^5.0.0-alpha.2",
56-
"fast-check": "^3.10.0",
56+
"fast-check": "^4.0.0",
5757
"jest": "^29.6.2",
5858
"jest-extended": "^4.0.0",
5959
"jest-junit": "^16.0.0",

tests/setup.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
import { jest } from '@jest/globals';
2-
3-
globalThis.jest = jest;

tests/setupAfterEnv.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { jest } from '@jest/globals';
2+
13
// Default timeout per test
24
// some tests may take longer in which case you should specify the timeout
35
// explicitly for each test by using the third parameter of test function

tsconfig.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@
2828
"./tests/**/*",
2929
"./scripts/**/*",
3030
"./benches/**/*"
31-
]
31+
],
32+
"ts-node": {
33+
"esm": true,
34+
"transpileOnly": true,
35+
"swc": true
36+
}
3237
}

0 commit comments

Comments
 (0)