Skip to content

Commit

Permalink
test: use new import technique
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 14, 2025
1 parent eee40f3 commit 12219cc
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 56 deletions.
6 changes: 1 addition & 5 deletions test/abi.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2046,8 +2046,4 @@ describe('simple decoder API', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/ens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@ describe('ENS', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/fee.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,4 @@ describe('Fees', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import './ssz.test.js';
import './kzg.test.js';
import './typed-data.test.js';

should.run();
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/kzg.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,4 @@ describe('KZG', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/net.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,4 @@ describe('Network', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/rlp.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,4 @@ describe('RLP', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/ssz.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,4 @@ describe('SSZ', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/tx.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,4 @@ describe('Transactions', () => {
})
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/typed-data.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1345,8 +1345,4 @@ describe('typedData (EIP-712)', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/uniswap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,4 @@ describe('uniswap', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);
6 changes: 1 addition & 5 deletions test/verkle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2707,8 +2707,4 @@ describe('Verkle', () => {
});
});

// ESM is broken.
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
should.runWhen(import.meta.url);

0 comments on commit 12219cc

Please sign in to comment.