]> git.codecow.com Git - libnemo.git/commitdiff
Update imports for performance tests too.
authorChris Duncan <chris@zoso.dev>
Wed, 23 Jul 2025 05:48:21 +0000 (22:48 -0700)
committerChris Duncan <chris@zoso.dev>
Wed, 23 Jul 2025 05:48:21 +0000 (22:48 -0700)
test/perf.account.js
test/perf.block.js
test/perf.wallet.js

index 76f15d27c63601d6c073fdf5c7fdcf19e32f7c44..0b692ce6f1166548bed06348cc39001ccbbd2b63 100644 (file)
@@ -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 () => {
index e940777d78cd36630d8190857231d5da618b7c04..87b6513ec65884023c68b1dbf74e9c627e65d7a2 100644 (file)
@@ -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 () => {
index bb74492fc62cefc5ee481a4aa130616980aeaf67..f11d1c4636d8d86a501ac05575e7209b40074d80 100644 (file)
@@ -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 () => {