diff --git a/test/index.js b/test/index.js index 1f16f65..8a56e20 100644 --- a/test/index.js +++ b/test/index.js @@ -1,7 +1,14 @@ import BIP32Creator from '../src/esm/index.js' import tape from 'tape' -import fixtures from './fixtures/index.json' assert { type: "json" } -const { valid, invalid } = fixtures +import { readFile } from 'fs/promises' +import { fileURLToPath } from 'url' +import { dirname, join } from 'path' + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const fixtures = JSON.parse( + await readFile(join(__dirname, './fixtures/index.json'), 'utf8') +) +const { valid, invalid } = fixtures import * as ecc from "tiny-secp256k1"; import * as tools from "uint8array-tools"; const BIP32 = BIP32Creator(ecc) @@ -323,4 +330,4 @@ tape('tweak - neutered', (t) => { t.equal(signer.verify(seed, signatureLowR), false) t.equal(signer.verifySchnorr(hash, schnorrsig), true) t.equal(signer.verifySchnorr(seed, schnorrsig), false) -}) +}) \ No newline at end of file