-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(vitest): support network imports in vm pools
- Loading branch information
Showing
5 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,10 @@ import { expect, test } from 'vitest' | |
import slash from 'http://localhost:9602/[email protected]' | ||
|
||
// test without local server | ||
// - with internal imports with a relative path '/v135/[email protected]/es2022/slash.mjs' | ||
// import slash from 'https://esm.sh/[email protected]' | ||
// - single file | ||
// import slash from 'https://esm.sh/v135/[email protected]/es2022/slash.mjs' | ||
|
||
test('network imports', () => { | ||
expect(slash('foo\\bar')).toBe('foo/bar') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,6 @@ export default defineConfig({ | |
forks: { | ||
execArgv: ['--experimental-network-imports'], | ||
}, | ||
// not supported? | ||
// FAIL test/basic.test.ts [ test/basic.test.ts ] | ||
// Error: ENOENT: no such file or directory, open 'http://localhost:9602/[email protected]' | ||
// ❯ Object.openSync node:fs:596:3 | ||
// ❯ readFileSync node:fs:464:35 | ||
vmThreads: { | ||
execArgv: ['--experimental-network-imports'], | ||
}, | ||
}, | ||
// let vite serve public/[email protected] | ||
api: 9602, | ||
|