Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jun 28, 2024
1 parent 4c95d16 commit 9c2ab28
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion test/bls.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { deepStrictEqual, throws } from 'node:assert';
import { describe, should } from 'micro-should';
import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
import { utf8 } from '@scure/base';
import * as bls from '../lib/esm/bls.js';
import * as bls from '../esm/bls.js';

const vectors = [
[
Expand Down
2 changes: 1 addition & 1 deletion test/ipns.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deepStrictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import * as ipns from '../lib/esm/ipns.js';
import * as ipns from '../esm/ipns.js';
import { hex } from '@scure/base';

describe('ipns', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/otp.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'node:assert';
import { should, describe } from 'micro-should';
import { hexToBytes } from '@noble/hashes/utils';
import * as otp from '../lib/esm/otp.js';
import * as otp from '../esm/otp.js';

describe('otp', () => {
should('OTP url parser', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/password-slow.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'node:assert';
import crypto from 'node:crypto';
import { should } from 'micro-should';
import * as pwd from '../lib/esm/password.js';
import * as pwd from '../esm/password.js';

const randomBytes = (len) => Uint8Array.from(crypto.randomBytes(len));
const ITERS = 10000000;
Expand Down
10 changes: 5 additions & 5 deletions test/password.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assert from 'node:assert';
import { should, describe } from 'micro-should';
import { sha256 } from '@noble/hashes/sha256';
import * as pwd from '../lib/esm/password.js';
import * as pwd from '../esm/password.js';

describe('password', () => {
should('Set utils', () => {
Expand All @@ -16,10 +16,10 @@ describe('password', () => {
const cc = new Set('qr');
// prettier-ignore
assert.deepStrictEqual(pwd.product(aa, bb, cc), new Set([
'adq', 'adr', 'aeq', 'aer', 'afq', 'afr',
'bdq', 'bdr', 'beq', 'ber', 'bfq', 'bfr',
'cdq', 'cdr', 'ceq', 'cer', 'cfq', 'cfr',
]));
'adq', 'adr', 'aeq', 'aer', 'afq', 'afr',
'bdq', 'bdr', 'beq', 'ber', 'bfq', 'bfr',
'cdq', 'cdr', 'ceq', 'cer', 'cfq', 'cfr',
]));
});
should('Mask utils', () => {
assert.deepStrictEqual(pwd.mask('11').cardinality, 100n);
Expand Down
2 changes: 1 addition & 1 deletion test/pgp.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deepStrictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import * as pgp from '../lib/esm/pgp.js';
import * as pgp from '../esm/pgp.js';
import { hex } from '@scure/base';

// Generated by gpg (GnuPG) 2.3.3, libgcrypt 1.9.4
Expand Down
2 changes: 1 addition & 1 deletion test/pgp_keygen.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { deepStrictEqual } from 'node:assert';
import cp from 'node:child_process';
import fs from 'node:fs';
import { randomBytes } from '@noble/hashes/utils';
import pgp from '../lib/esm/pgp.js';
import pgp from '../esm/pgp.js';
import { should } from 'micro-should';

// Warning: this test will execute system command `gpg`
Expand Down
2 changes: 1 addition & 1 deletion test/slip10/index.test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { deepStrictEqual, throws } from 'node:assert';
import { HDKey } from '../../lib/esm/slip10.js';
import { HDKey } from '../../esm/slip10.js';
import { describe, should } from 'micro-should';
import { bytesToHex } from '@noble/hashes/utils';
import { fixtures } from './slip-0010.fixture.mjs';
Expand Down
2 changes: 1 addition & 1 deletion test/ssh.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deepStrictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import * as ssh from '../lib/esm/ssh.js';
import * as ssh from '../esm/ssh.js';
import { hex } from '@scure/base';

// Real key from the internet
Expand Down
2 changes: 1 addition & 1 deletion test/tor.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { deepStrictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import * as tor from '../lib/esm/tor.js';
import * as tor from '../esm/tor.js';
import { hex } from '@scure/base';

describe('tor', () => {
Expand Down

0 comments on commit 9c2ab28

Please sign in to comment.