Skip to content

Commit d72a854

Browse files
committed
test: fix windows path compatibility
1 parent 0e606a2 commit d72a854

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import fs from 'fs'
22
import path from 'path'
3+
import { fileURLToPath } from 'url'
34

45
import { spawnSync } from 'child_process'
56

6-
const playgroundDir = new URL('./playground/', import.meta.url).pathname
7+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
8+
const playgroundDir = path.resolve(__dirname, './playground/')
79

810
for (const projectName of fs.readdirSync(playgroundDir)) {
911
// TODO: test `dev` & `build` commands

0 commit comments

Comments
 (0)