Skip to content
Merged
Prev Previous commit
Next Next commit
fix: code review
  • Loading branch information
eryue0220 committed Aug 10, 2023
commit 54ff86e0cda477f0ced0080120cf4a82dfc0d6c0
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import {jest} from '@jest/globals';

test('should have a fresh module state in each isolateModulesAsync context', async () => {
await jest.isolateModulesAsync(async () => {
const {getState, incState} = await import('../main.js');
const {getState, incState} = await import('../main.mjs');
expect(getState()).toBe(0);
incState();
expect(getState()).toBe(1);
});
await jest.isolateModulesAsync(async () => {
const {getState, incState} = await import('../main.js');
const {getState, incState} = await import('../main.mjs');
expect(getState()).toBe(0);
incState();
expect(getState()).toBe(1);
Expand Down
File renamed without changes.
9 changes: 8 additions & 1 deletion e2e/async-esm-import/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"name": "async-esm-import",
"jest": {
"testEnvironment": "node"
"testEnvironment": "node",
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(js?|ts?|mjs?|mts?)$",
"moduleFileExtensions": [
"js",
"ts",
"mjs",
"mts"
]
}
}
1 change: 1 addition & 0 deletions e2e/resolve-async/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"type": "module",
"jest": {
"resolver": "<rootDir>/resolver.cjs",
"transform": {}
Expand Down