Skip to content

Commit de1e4b8

Browse files
authored
[v6.x] fix wpts on windows (#4093)
* [v6.x] fix wpts on windows Signed-off-by: Matteo Collina <[email protected]> * fixup Signed-off-by: Matteo Collina <[email protected]> --------- Signed-off-by: Matteo Collina <[email protected]>
1 parent 4e07dda commit de1e4b8

6 files changed

+6
-12
lines changed

test/wpt/start-FileAPI.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
65

7-
const serverPath = fileURLToPath(join(import.meta.url, '../server/server.mjs'))
6+
const serverPath = fileURLToPath(new URL('./server/server.mjs', import.meta.url))
87

98
const child = fork(serverPath, [], {
109
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

test/wpt/start-cacheStorage.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
65

7-
const serverPath = join(fileURLToPath(import.meta.url), '../server/server.mjs')
6+
const serverPath = fileURLToPath(new URL('./server/server.mjs', import.meta.url))
87

98
const child = fork(serverPath, [], {
109
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

test/wpt/start-eventsource.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
65

7-
const serverPath = join(fileURLToPath(import.meta.url), '../server/server.mjs')
6+
const serverPath = fileURLToPath(new URL('./server/server.mjs', import.meta.url))
87

98
const child = fork(serverPath, [], {
109
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

test/wpt/start-fetch.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
65

76
const { WPT_REPORT } = process.env
87

9-
const serverPath = join(fileURLToPath(import.meta.url), '../server/server.mjs')
8+
const serverPath = fileURLToPath(new URL('./server/server.mjs', import.meta.url))
109

1110
const child = fork(serverPath, [], {
1211
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

test/wpt/start-mimesniff.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
65

76
const { WPT_REPORT } = process.env
87

9-
const serverPath = join(fileURLToPath(import.meta.url), '../server/server.mjs')
8+
const serverPath = fileURLToPath(new URL('./server/server.mjs', import.meta.url))
109

1110
const child = fork(serverPath, [], {
1211
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

test/wpt/start-websockets.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { WPTRunner } from './runner/runner.mjs'
2-
import { join } from 'path'
32
import { fileURLToPath } from 'url'
43
import { fork } from 'child_process'
54
import { on } from 'events'
@@ -22,7 +21,7 @@ if (process.env.CI) {
2221
// process.exit(0)
2322
}
2423

25-
const serverPath = join(fileURLToPath(import.meta.url), '../server/websocket.mjs')
24+
const serverPath = fileURLToPath(new URL('./server/websocket.mjs', import.meta.url))
2625

2726
const child = fork(serverPath, [], {
2827
stdio: ['pipe', 'pipe', 'pipe', 'ipc']

0 commit comments

Comments
 (0)