diff --git a/test/many.ts b/test/many.ts index 2ab6bf0..bbc660c 100644 --- a/test/many.ts +++ b/test/many.ts @@ -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 () { @@ -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')