From: Chris Duncan Date: Wed, 23 Jul 2025 05:48:21 +0000 (-0700) Subject: Update imports for performance tests too. X-Git-Tag: v0.10.5~55^2~26 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=2a8b320868971d19f1d35005d5fef9b052dc148a;p=libnemo.git Update imports for performance tests too. --- diff --git a/test/perf.account.js b/test/perf.account.js index 76f15d2..0b692ce 100644 --- a/test/perf.account.js +++ b/test/perf.account.js @@ -3,9 +3,9 @@ 'use strict' -import { assert, stats, suite, test } from './GLOBALS.mjs' +import { assert, isNode, stats, suite, test } from './GLOBALS.mjs' import { NANO_TEST_VECTORS } from './VECTORS.js' -import { Bip44Wallet, Blake2bWallet } from '../dist/main.min.js' +const { Bip44Wallet, Blake2bWallet } = await import(isNode ? '../dist/nodejs.min.js' : '../dist/browser.min.js') await Promise.all([ suite('Account performance', { skip: true }, async () => { diff --git a/test/perf.block.js b/test/perf.block.js index e940777..87b6513 100644 --- a/test/perf.block.js +++ b/test/perf.block.js @@ -3,9 +3,9 @@ 'use strict' -import { stats, suite, test } from './GLOBALS.mjs' +import { isNode, stats, suite, test } from './GLOBALS.mjs' import { NANO_TEST_VECTORS } from './VECTORS.js' -import { SendBlock } from '../dist/main.min.js' +const { SendBlock } = await import(isNode ? '../dist/nodejs.min.js' : '../dist/browser.min.js') await Promise.all([ suite('Block performance', { skip: true }, async () => { diff --git a/test/perf.wallet.js b/test/perf.wallet.js index bb74492..f11d1c4 100644 --- a/test/perf.wallet.js +++ b/test/perf.wallet.js @@ -3,9 +3,9 @@ 'use strict' -import { stats, suite, test } from './GLOBALS.mjs' +import { isNode, stats, suite, test } from './GLOBALS.mjs' import { NANO_TEST_VECTORS } from './VECTORS.js' -import { Bip44Wallet, Blake2bWallet } from '../dist/main.min.js' +const { Bip44Wallet, Blake2bWallet } = await import(isNode ? '../dist/nodejs.min.js' : '../dist/browser.min.js') await Promise.all([ suite(`Wallet performance`, { skip: true }, async () => {