From e72e3b43d13b7d09ab0bf13afd3a70842a772fac Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 5 Dec 2024 08:13:27 -0800 Subject: [PATCH] In test files, replace node test runner module imports with jest. --- perf/wallet.perf.mjs | 3 +-- test/create-wallet.test.js | 3 +-- test/derive-accounts.test.js | 3 +-- test/import-wallet.test.js | 3 +-- test/lock-unlock-wallet.js | 3 +-- test/manage-rolodex.js | 3 +-- test/refresh-accounts.test.js | 3 +-- test/sign-blocks.test.js | 3 +-- test/tools.test.js | 3 +-- 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/perf/wallet.perf.mjs b/perf/wallet.perf.mjs index 63d185b..3ce78ef 100644 --- a/perf/wallet.perf.mjs +++ b/perf/wallet.perf.mjs @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { test } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Bip44Wallet, Blake2bWallet } from '#dist/main.js' diff --git a/test/create-wallet.test.js b/test/create-wallet.test.js index 83438b3..529addb 100644 --- a/test/create-wallet.test.js +++ b/test/create-wallet.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Bip44Wallet, Blake2bWallet, LedgerWallet } from '#dist/main.js' diff --git a/test/derive-accounts.test.js b/test/derive-accounts.test.js index 1d9203a..f9fe583 100644 --- a/test/derive-accounts.test.js +++ b/test/derive-accounts.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Bip44Wallet, Blake2bWallet, LedgerWallet } from '#dist/main.js' diff --git a/test/import-wallet.test.js b/test/import-wallet.test.js index c54ab6b..68f0495 100644 --- a/test/import-wallet.test.js +++ b/test/import-wallet.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { BIP32_TEST_VECTORS, CUSTOM_TEST_VECTORS, NANO_TEST_VECTORS, TREZOR_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Account, Bip44Wallet, Blake2bWallet } from '#dist/main.js' diff --git a/test/lock-unlock-wallet.js b/test/lock-unlock-wallet.js index 5fa4fd7..e8cedc9 100644 --- a/test/lock-unlock-wallet.js +++ b/test/lock-unlock-wallet.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS, TREZOR_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Bip44Wallet, Blake2bWallet } from '#dist/main.js' diff --git a/test/manage-rolodex.js b/test/manage-rolodex.js index 983149f..399bf76 100644 --- a/test/manage-rolodex.js +++ b/test/manage-rolodex.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Rolodex, Tools } from '#dist/main.js' diff --git a/test/refresh-accounts.test.js b/test/refresh-accounts.test.js index 029519b..9803a94 100644 --- a/test/refresh-accounts.test.js +++ b/test/refresh-accounts.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Account, Bip44Wallet, Rpc } from '#dist/main.js' diff --git a/test/sign-blocks.test.js b/test/sign-blocks.test.js index f8c947d..bdc60b8 100644 --- a/test/sign-blocks.test.js +++ b/test/sign-blocks.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { SendBlock, ReceiveBlock, ChangeBlock } from '#dist/main.js' diff --git a/test/tools.test.js b/test/tools.test.js index a595d19..925753b 100644 --- a/test/tools.test.js +++ b/test/tools.test.js @@ -4,8 +4,7 @@ 'use strict' import '#test/GLOBALS.mjs' -import { describe, it } from 'node:test' -import { strict as assert } from 'assert' +import { describe, expect, test } from '@jest/globals' import { RAW_MAX, NANO_TEST_VECTORS } from '#test/TEST_VECTORS.js' import { Bip44Wallet, Account, SendBlock, Rpc, Tools } from '#dist/main.js' -- 2.34.1