diff --git a/__test__/decode.spec.ts b/__test__/decode.spec.ts index 66b1c099..3f2d9156 100644 --- a/__test__/decode.spec.ts +++ b/__test__/decode.spec.ts @@ -1,8 +1,9 @@ -import test from 'ava' +import test from 'ava'; +import path from 'path'; -import { decode } from '../index.js' +import { decode } from '../index.js'; -const dirname = new URL('.', import.meta.url).pathname +const dirname = path.join(new URL('.', import.meta.url).pathname); test('decode', async (t) => { await decode(dirname + 'decode.png') diff --git a/__test__/encode.spec.ts b/__test__/encode.spec.ts index 08667702..546432f0 100644 --- a/__test__/encode.spec.ts +++ b/__test__/encode.spec.ts @@ -1,11 +1,13 @@ -import fs from 'node:fs' -import test from 'ava' +import test from 'ava'; +import fs from 'node:fs'; +import path from 'path'; -import { encode } from '../index.js' +import { encode } from '../index.js'; -const dirname = new URL('.', import.meta.url).pathname +const dirname = path.join(new URL('.', import.meta.url).pathname); test.afterEach(() => { + console.log('dirname', dirname); const output = dirname + 'output.png' if (fs.existsSync(output)) { fs.unlinkSync(output)