Skip to content

Commit

Permalink
ci: fix tests on windows
Browse files Browse the repository at this point in the history
Use path.sep instead of / when testing output
  • Loading branch information
isaacs committed Aug 3, 2023
1 parent acc304c commit 3b81c46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ t.test('prioritizes exact match if exists, unless --all', async t => {
}
})
const res = await run(['routes/[id].tsx'], { cwd })
t.equal(res.stdout, 'routes/[id].tsx\n')
t.equal(res.stdout, `routes${sep}[id].tsx\n`)

const all = await run(['routes/[id].tsx', '--all'], { cwd })
t.match(all.stdout, 'routes/i.tsx\n')
t.match(all.stdout, 'routes/d.tsx\n')
t.match(all.stdout, `routes${sep}i.tsx\n`)
t.match(all.stdout, `routes${sep}d.tsx\n`)
})

t.test('uses default pattern if none provided', async t => {
Expand Down

0 comments on commit 3b81c46

Please sign in to comment.