Skip to content

Commit

Permalink
chore: fix passing filename to spawn read
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 31, 2023
1 parent 2127b3e commit 8b4d28c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/many.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import t from 'tap'
import { fileURLToPath } from 'url'
import spawnRead from './fixtures/setup.ts'
import { read } from '../src/read.ts'

const __filename = fileURLToPath(import.meta.url)

const times = new Array(18).fill(null).map((_, i) => (i + 1).toString())

async function child () {
Expand All @@ -27,7 +24,7 @@ const main = () => {
acc[`num ${k}`] = k
return acc
}, {})
const { stdout, stderr } = await spawnRead(__filename, writes)
const { stdout, stderr } = await spawnRead(import.meta.url, writes)

t.equal(stdout, Object.keys(writes).join(' ') + ' ')
t.equal(stderr, times.join(' ') + '\n')
Expand Down

0 comments on commit 8b4d28c

Please sign in to comment.