Skip to content

Commit

Permalink
test: rename imported node module name
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Mar 14, 2024
1 parent 6e18254 commit 5ed1402
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/basic.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import { hex, base64 } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand Down
4 changes: 2 additions & 2 deletions test/bip174-psbt.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import { hex } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand All @@ -11,7 +11,7 @@ for (let i = 0; i < psbtV.length; i++) {
const tx = hex.decode(v.hex);
if (v.invalid) {
if (v.signer) return; // we don't test these, because we have no key for signer
throws(() => btc.Transaction.fromPSBT(tx))
throws(() => btc.Transaction.fromPSBT(tx));
} else {
const parsed = btc.Transaction.fromPSBT(tx);
const encoded = parsed.toPSBT();
Expand Down
4 changes: 1 addition & 3 deletions test/bip340-schnorr.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { deepStrictEqual } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import { hex } from '@scure/base';
import { schnorr } from '@noble/curves/secp256k1';
// Required for sync sha
import * as btc from '../lib/esm/index.js';
import { default as v340 } from './fixtures/bip340.json' assert { type: 'json' };

// BIP340 (same as in secp256k1, just to be sure)
Expand Down
2 changes: 1 addition & 1 deletion test/bip341-taproot.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import { hex } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/bip67-multisig.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import { hex } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/bitcoinjs-test/btcjs-address.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import { hex, base64 } from '@scure/base';
import * as btc from '../../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/bitcoinjs-test/btcjs-taproot.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import { hex, base64 } from '@scure/base';
import * as btc from '../../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/bitcoinjs-test/btcjs.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import { hex, base64 } from '@scure/base';
import * as btc from '../../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/psbt-test/bip174-psbt-extended.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import { hex, base64 } from '@scure/base';
import * as btc from '../../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/slow.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import * as btc from '../lib/esm/index.js';
import { secp256k1, schnorr as secp256k1_schnorr } from '@noble/curves/secp256k1';
Expand Down
2 changes: 1 addition & 1 deletion test/taproot-multisig.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { should } from 'micro-should';
import { hex } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand Down
2 changes: 1 addition & 1 deletion test/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual, throws } from 'node:assert';
import { should } from 'micro-should';
import * as btc from '../lib/esm/index.js';

Expand Down
2 changes: 1 addition & 1 deletion test/utxo-select.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual, throws } from 'assert';
import { deepStrictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import { hex } from '@scure/base';
import * as btc from '../lib/esm/index.js';
Expand Down

0 comments on commit 5ed1402

Please sign in to comment.