Skip to content

Commit

Permalink
test, bench: prefix imports of built-in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed May 18, 2024
1 parent b5baec2 commit c2fd82a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion benchmark/ml-dsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export async function main() {
}

// ESM is broken.
import url from 'url';
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
main();
}
4 changes: 2 additions & 2 deletions benchmark/ml-kem.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export async function main() {
}

// ESM is broken.
import url from 'url';
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
main();
}
}
2 changes: 1 addition & 1 deletion benchmark/slh-dsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function main() {
}

// ESM is broken.
import url from 'url';
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
main();
}
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './ml-dsa.test.js';
import './big.test.js';

// ESM is broken.
import url from 'url';
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
//should.runParallel(); // 43 seconds
should.run(); // 176 seconds
Expand Down
2 changes: 1 addition & 1 deletion test/ml-dsa.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('ML-DSA Dilithium', () => {
});

// ESM is broken.
import url from 'url';
import url from 'node:url';
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
should.run();
}
2 changes: 1 addition & 1 deletion test/slh-kem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('SLH-DSA SPHINCS', () => {
});

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

0 comments on commit c2fd82a

Please sign in to comment.