Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4cf437c

Browse files
committedOct 3, 2023
Fix for Windows
1 parent 6c697a0 commit 4cf437c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎test/es-module/test-esm-type-flag-cli-entry.mjs

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,55 +37,55 @@ describe('--experimental-default-type=module should not parse paths as URLs', {
3737
it('should not parse a `?` in a filename as starting a query string', async () => {
3838
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
3939
'--experimental-default-type=module',
40-
'wha?.js',
40+
'file#1.js',
4141
], {
4242
cwd: fixtures.path('es-modules/package-without-type'),
4343
});
4444

4545
strictEqual(stderr, '');
46-
strictEqual(stdout, 'wha?\n');
46+
strictEqual(stdout, 'file#1\n');
4747
strictEqual(code, 0);
4848
strictEqual(signal, null);
4949
});
5050

5151
it('should resolve `..`', async () => {
5252
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
5353
'--experimental-default-type=module',
54-
'../package-without-type/wha?.js',
54+
'../package-without-type/file#1.js',
5555
], {
5656
cwd: fixtures.path('es-modules/package-without-type'),
5757
});
5858

5959
strictEqual(stderr, '');
60-
strictEqual(stdout, 'wha?\n');
60+
strictEqual(stdout, 'file#1\n');
6161
strictEqual(code, 0);
6262
strictEqual(signal, null);
6363
});
6464

6565
it('should allow a leading `./`', async () => {
6666
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
6767
'--experimental-default-type=module',
68-
'./wha?.js',
68+
'./file#1.js',
6969
], {
7070
cwd: fixtures.path('es-modules/package-without-type'),
7171
});
7272

7373
strictEqual(stderr, '');
74-
strictEqual(stdout, 'wha?\n');
74+
strictEqual(stdout, 'file#1\n');
7575
strictEqual(code, 0);
7676
strictEqual(signal, null);
7777
});
7878

7979
it('should not require a leading `./`', async () => {
8080
const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [
8181
'--experimental-default-type=module',
82-
'wha?.js',
82+
'file#1.js',
8383
], {
8484
cwd: fixtures.path('es-modules/package-without-type'),
8585
});
8686

8787
strictEqual(stderr, '');
88-
strictEqual(stdout, 'wha?\n');
88+
strictEqual(stdout, 'file#1\n');
8989
strictEqual(code, 0);
9090
strictEqual(signal, null);
9191
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('file#1');

‎test/fixtures/es-modules/package-without-type/wha?.js

-1
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.