Skip to content

Commit 3c6eac9

Browse files
authored
chore: follow up with win test fix (#818)
1 parent 41a44f7 commit 3c6eac9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/roots.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ import { pathToFileURL } from 'url';
2121
import { test, expect } from './fixtures.js';
2222
import { createHash } from '../src/utils.js';
2323

24+
const p = process.platform === 'win32' ? 'c:\\non\\existent\\folder' : '/non/existent/folder';
25+
2426
test('should use separate user data by root path', async ({ startClient, server }, testInfo) => {
2527
const { client } = await startClient({
2628
roots: [
2729
{
2830
name: 'test',
29-
uri: 'file:///non/existent/folder',
30-
},
31+
uri: 'file://' + p.replace(/\\/g, '/'),
32+
}
3133
],
3234
});
3335

@@ -36,7 +38,7 @@ test('should use separate user data by root path', async ({ startClient, server
3638
arguments: { url: server.HELLO_WORLD },
3739
});
3840

39-
const hash = createHash('/non/existent/folder');
41+
const hash = createHash(p);
4042
const [file] = await fs.promises.readdir(testInfo.outputPath('ms-playwright'));
4143
expect(file).toContain(hash);
4244
});

0 commit comments

Comments
 (0)