Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
3d41643
deps: update undici to 7.19.0
nodejs-github-bot Jan 24, 2026
05e9a9f
deps: update undici to 7.19.1
nodejs-github-bot Jan 25, 2026
625b90b
deps: update undici to 7.19.2
nodejs-github-bot Jan 30, 2026
a9e70ce
test: ensure assertions are reached on more tests
aduh95 Nov 15, 2025
a723f72
lib: add support for readable byte streams to .toWeb()
seriousme Nov 16, 2025
5a9e9f4
meta: bump actions/checkout from 5.0.0 to 5.0.1
dependabot[bot] Nov 20, 2025
9370330
repl: tab completion targets `<class>` instead of `new <class>`
hainenber Nov 20, 2025
f814307
lib: prefer `call()` over `apply()` if argument list is not array
LiviaMedeiros Nov 23, 2025
1948861
events: repurpose `events.listenerCount()` to accept EventTargets
Renegade334 Nov 26, 2025
8c75e4e
meta: bump actions/checkout from 5.0.1 to 6.0.0
dependabot[bot] Dec 3, 2025
35b1759
module: allow subpath imports that start with `#/`
hybrist Dec 4, 2025
407807b
test: skip tests not passing without `NODE_OPTIONS` support
aduh95 Dec 7, 2025
cb54b3c
http: add http.setGlobalProxyFromEnv()
joyeecheung Dec 10, 2025
8e900af
util: add convertProcessSignalToExitCode utility
ErickWendel Dec 11, 2025
9cc1c46
repl: fix getters triggering side effects during completion
dario-piotrowicz Dec 20, 2025
2d72ea6
process: preserve AsyncLocalStorage in queueMicrotask only when needed
gurgunday Dec 21, 2025
f5233df
stream: do not pass `readable.compose()` output via `Readable.from()`
Renegade334 Dec 23, 2025
cd80d36
meta: bump actions/upload-artifact from 5.0.0 to 6.0.0
dependabot[bot] Jan 3, 2026
629f0ea
meta: bump actions/checkout from 6.0.0 to 6.0.1
dependabot[bot] Jan 3, 2026
ce2acf0
meta: bump actions/download-artifact from 6.0.0 to 7.0.0
dependabot[bot] Jan 3, 2026
e54975e
deps: V8: cherry-pick highway@dcc0ca1cd42
richardlau Jan 16, 2026
74bcd0a
test: ensure assertions are reached on more tests
aduh95 Nov 17, 2025
aeed0cc
test: use `RegExp.escape` to improve test reliability
aduh95 Nov 23, 2025
e06adcb
test: ensure assertions are reached on more tests
aduh95 Nov 24, 2025
2738328
test: ensure assertions are reached on more tests
aduh95 Nov 17, 2025
8e9aded
test: ensure assertions are reached on all tests
aduh95 Nov 27, 2025
4afbbcf
tools: enforce trailing commas in `test/sequential`
aduh95 Dec 3, 2025
8a0f619
tools: enforce trailing commas in `test/es-module`
aduh95 Nov 29, 2025
4f871ee
test: enforce better never-settling-promise detection
aduh95 Dec 10, 2025
d4034df
test: forbid use of named imports for fixtures
aduh95 Jan 1, 2026
8e48e72
doc: clean up writing-and-running-benchmarks.md
Hardanish-Singh Jan 13, 2026
d77f98c
test_runner: support expecting a test-case to fail
JakobJingleheimer Jan 15, 2026
24cf6b8
test: reveal wpt evaluation errors in status files
legendecas Jan 19, 2026
33d8e83
sqlite: add sqlite prepare options args
araujogui Jan 19, 2026
c0ceb9b
sqlite: enable defensive mode by default
louwers Jan 20, 2026
345a40f
test: use fixture directories for sea tests
joyeecheung Jan 1, 2026
c370c3d
deps: add tools and scripts to pull LIEF as a dependency
joyeecheung Dec 22, 2025
f3a24c7
deps: add LIEF as a dependency
joyeecheung Dec 22, 2025
6f4a4f6
sea: split sea binary manipulation code
joyeecheung Dec 22, 2025
d6f7c8d
fs: add ignore option to fs.watch
mcollina Jan 22, 2026
43b8a2b
test: add some validation for JSON doc output
aduh95 Jan 23, 2026
da13186
src: throw RangeError on failed ArrayBuffer BackingStore allocation
legendecas Jan 25, 2026
16bab79
process: do not truncate long strings in `--print`
mohd-akram Jan 25, 2026
8d7190b
module: do not wrap module._load when tracing is not enabled
joyeecheung Jan 26, 2026
ab63ddf
tools: add LIEF to license builder
legendecas Jan 26, 2026
7824c75
lib: unify ICU and no-ICU TextDecoder
ChALkeR Jan 27, 2026
8b6d31d
async_hooks: add trackPromises option to createHook()
joyeecheung Jan 28, 2026
8e8f705
sqlite: reserve vectors space
araujogui Jan 29, 2026
972f824
test_runner: add env option to run function
Ethan-Arrowood Jan 29, 2026
4c80031
stream: add bytes() method to stream/consumers
wantaekchoi Jan 29, 2026
069874b
lib: use StringPrototypeStartsWith from primordials in locks
kimtaejin3 Jan 29, 2026
6640de2
test_runner: differentiate todo and failure styles
MoLow Jan 30, 2026
5998987
build: aix: deoptimize implementation-visitor.cc with --shared
sxa Jan 30, 2026
6a4de69
test_runner: fix passing `expectFailure`
MoLow Jan 30, 2026
830fff0
lib: recycle queues
ronag Jan 30, 2026
8c25489
test: split test-fs-watch-ignore-*
lpinca Jan 30, 2026
0e7571a
sqlite: change approach to fix segfault SQLTagStore
louwers Jan 31, 2026
180778f
assert: fix loose deepEqual arrays with undefined and null failing
BridgeAR Feb 1, 2026
6df8be4
lib: use utf8 fast path for streaming TextDecoder
ChALkeR Jan 27, 2026
83bcd38
benchmark: add streaming TextDecoder benchmark
ChALkeR Jan 27, 2026
563ab69
src: add initial support for ESM in embedder API
joyeecheung Jan 26, 2026
21b23cd
test_runner: fix test enqueue when test file has syntax error
geeksilva97 Feb 2, 2026
1519251
module: do not invoke resolve hooks twice for imported cjs
joyeecheung Feb 2, 2026
4b2187a
test: unify assertSnapshot common patterns
legendecas Feb 2, 2026
b5113e2
deps: update amaro to 1.1.6
nodejs-github-bot Feb 3, 2026
74e4710
deps: update googletest to 56efe3983185e3f37e43415d1afa97e3860f187f
nodejs-github-bot Feb 3, 2026
4889dc4
doc: update `server.dropMaxConnection` link
samuel871211 Feb 3, 2026
356ff5f
test: use the skipIfNoWatch() utility function
lpinca Feb 3, 2026
ecf5947
test: update WPT for url to e3c46fdf55
nodejs-github-bot Feb 3, 2026
eac9f4f
test: fix race condition in watch mode tests
mcollina Feb 3, 2026
9d79c66
test: remove duplicate wpt tests
panva Feb 3, 2026
c085c8a
meta: bump actions/checkout from 6.0.1 to 6.0.2
dependabot[bot] Feb 3, 2026
5da7b51
meta: bump actions/stale from 10.1.0 to 10.1.1
dependabot[bot] Feb 3, 2026
0e5922e
meta: bump peter-evans/create-pull-request from 8.0.0 to 8.1.0
dependabot[bot] Feb 3, 2026
9a64f2f
meta: bump actions/cache from 5.0.1 to 5.0.3
dependabot[bot] Feb 3, 2026
c517df2
meta: bump actions/setup-node from 6.1.0 to 6.2.0
dependabot[bot] Feb 3, 2026
e8d9bd9
meta: bump actions/setup-python from 6.1.0 to 6.2.0
dependabot[bot] Feb 3, 2026
0637bdb
meta: bump step-security/harden-runner from 2.14.0 to 2.14.1
dependabot[bot] Feb 4, 2026
40a872a
meta: bump github/codeql-action from 4.31.9 to 4.32.0
dependabot[bot] Feb 4, 2026
2d7e5f9
http: implement slab allocation for HTTP header parsing
mertcanaltin Feb 4, 2026
d52b535
doc: correct tools README Boxstarter link
MikeMcC399 Feb 4, 2026
b78d814
meta: persist sccache daemon until end of build workflows
Renegade334 Feb 4, 2026
17b363a
dns: fix Windows SRV ECONNREFUSED by adjusting c-ares fallback detection
NotVivek12 Feb 3, 2026
06513f5
test: fix flaky test-performance-eventloopdelay
mcollina Feb 5, 2026
8f5a3e5
doc: fix grammatical error in README.md
junnyontop-pixel Feb 5, 2026
f91a377
sqlite: use DictionaryTemplate for run() result
mertcanaltin Feb 5, 2026
4c1abf7
tools,win: upgrade install additional tools to Visual Studio 2026
MikeMcC399 Feb 5, 2026
5e71924
doc: deprecation add more codemod
AugustinMauroy Feb 5, 2026
a0e09c9
doc: document `url.format(urlString)` as deprecated under DEP0169
Renegade334 Feb 5, 2026
f0f98d4
tools: use ubuntu-slim runner in meta GitHub Actions
bnb Feb 6, 2026
6059055
tools: enforce removal of `lts-watch-*` labels on release proposals
aduh95 Feb 6, 2026
7a83b38
net: defer synchronous destroy calls in internalConnect
RajeshKumar11 Feb 6, 2026
38f43a6
test: fix case-insensitive path matching on Windows
mcollina Feb 6, 2026
97e5a65
deps: update undici to 7.21.0
nodejs-github-bot Feb 6, 2026
f44e67f
doc: fix --inspect security warning section
pimterry Feb 6, 2026
46a2dad
sqlite: avoid extra copy for large text binds
thisalihassan Feb 7, 2026
db478c4
src: use simdutf for one-byte string UTF-8 write in stringBytes
mertcanaltin Feb 6, 2026
5b8e72c
doc: mention default option for test runner env
styfle Feb 7, 2026
2d3b4a8
test: print stack immediately avoiding GC interleaving
legendecas Feb 7, 2026
33d0a8c
doc: clarify EventEmitter error handling in threat model
mcollina Feb 7, 2026
f0d8f37
src: elide heap allocation in structured clone implementation
addaleax Feb 8, 2026
7be7631
deps: update minimatch to 10.1.2
nodejs-github-bot Feb 8, 2026
699e2f8
deps: update amaro to 1.1.7
nodejs-github-bot Feb 8, 2026
2d6735d
deps: upgrade npm to 11.9.0
npm-cli-bot Feb 9, 2026
ad04a46
test: restraint version replacement pattern in snapshots
legendecas Feb 9, 2026
584c189
build: add `--shared-gtest` configure flag
aduh95 Jan 7, 2026
c6253ed
build: add `--shared-hdr-histogram` configure flag
aduh95 Jan 4, 2026
30601b6
build: add `--shared-nbytes` configure flag
aduh95 Jan 13, 2026
68da144
build,deps: replace cjs-module-lexer with merve
anonrig Jan 28, 2026
1f84fd9
build: skip sscache action on non-main branches
joyeecheung Feb 19, 2026
65c77d7
tools: use ubuntu-latest runner in `notify-on-push` workflow
aduh95 Feb 8, 2026
f658f48
tools: use ubuntu-slim runner in GHA
aduh95 Feb 10, 2026
e50e2f0
tools: use ubuntu-slim runner in GHA
aduh95 Feb 12, 2026
034589d
tools: avoid building twice in coverage jobs
aduh95 Feb 22, 2026
f98986c
tools: switch to ARM runners on GHA jobs
aduh95 Feb 22, 2026
4c10584
build: add support for Visual Studio 2026
targos Nov 19, 2025
6a4511b
build,win: fix vs2022 compilation
StefanStojanovic Jan 28, 2026
f657bb8
2026-02-24, Version 24.14.0 'Krypton' (LTS)
aduh95 Feb 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: ensure assertions are reached on more tests
PR-URL: #60634
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
aduh95 committed Feb 22, 2026
commit a9e70cefb07fb25968d831ef5b5b4a306dbcc3be
2 changes: 1 addition & 1 deletion test/eslint.config_partial.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default [
Array.from({ length: 13 }, (_, i) => String.fromCharCode(0x61 + i, 42)).join(',')
},n*,${
// 0x61 is code for 'a', this generates a string enumerating latin letters: 'z*,y*,…'
Array.from({ length: 2 }, (_, i) => String.fromCharCode(0x61 + 25 - i, 42)).join(',')
Array.from({ length: 5 }, (_, i) => String.fromCharCode(0x61 + 25 - i, 42)).join(',')
}}.{js,mjs,cjs}`,
],
rules: {
Expand Down
36 changes: 18 additions & 18 deletions test/parallel/test-vfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const common = require('../common');
const Module = require('module');
const fs = require('fs');
const tmpdir = require('../common/tmpdir');
const { deepStrictEqual, ok, strictEqual, throws } = require('assert');
const assert = require('assert');
const { join } = require('path');

const directory = tmpdir.resolve('directory');
Expand All @@ -17,20 +17,20 @@ tmpdir.refresh();
fs.writeFileSync(file, "module.exports = { a: 'b' }");
fs.mkdirSync(directory);

strictEqual(Module._stat(directory), 1);
ok(Module._stat(doesNotExist) < 0);
strictEqual(Module._stat(file), 0);
assert.strictEqual(Module._stat(directory), 1);
assert.ok(Module._stat(doesNotExist) < 0);
assert.strictEqual(Module._stat(file), 0);

const vfsDirectory = join(process.execPath, 'directory');
const vfsDoesNotExist = join(process.execPath, 'does-not-exist');
const vfsFile = join(process.execPath, 'file.js');

ok(Module._stat(vfsDirectory) < 0);
ok(Module._stat(vfsDoesNotExist) < 0);
ok(Module._stat(vfsFile) < 0);
assert.ok(Module._stat(vfsDirectory) < 0);
assert.ok(Module._stat(vfsDoesNotExist) < 0);
assert.ok(Module._stat(vfsFile) < 0);

deepStrictEqual(require(file), { a: 'b' });
throws(() => require(vfsFile), { code: 'MODULE_NOT_FOUND' });
assert.deepStrictEqual(require(file), { a: 'b' });
assert.throws(() => require(vfsFile), { code: 'MODULE_NOT_FOUND' });

common.expectWarning(
'ExperimentalWarning',
Expand Down Expand Up @@ -75,15 +75,15 @@ fs.realpathSync = function realpathSync(pathArgument, options) {
return pathArgument;
};

strictEqual(Module._stat(directory), 1);
ok(Module._stat(doesNotExist) < 0);
strictEqual(Module._stat(file), 0);
assert.strictEqual(Module._stat(directory), 1);
assert.ok(Module._stat(doesNotExist) < 0);
assert.strictEqual(Module._stat(file), 0);

strictEqual(Module._stat(vfsDirectory), 1);
ok(Module._stat(vfsDoesNotExist) < 0);
strictEqual(Module._stat(vfsFile), 0);
assert.strictEqual(Module._stat(vfsDirectory), 1);
assert.ok(Module._stat(vfsDoesNotExist) < 0);
assert.strictEqual(Module._stat(vfsFile), 0);

strictEqual(Module._stat(process.execPath), 1);
assert.strictEqual(Module._stat(process.execPath), 1);

deepStrictEqual(require(file), { a: 'b' });
deepStrictEqual(require(vfsFile), { x: 'y' });
assert.deepStrictEqual(require(file), { a: 'b' });
assert.deepStrictEqual(require(vfsFile), { x: 'y' });
6 changes: 3 additions & 3 deletions test/parallel/test-vm-module-basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ const util = require('util');
const module = new SyntheticModule([], () => {});
module.link(() => {});
const f = compileFunction('return import("x")', [], {
importModuleDynamically(specifier, referrer) {
importModuleDynamically: common.mustCall((specifier, referrer) => {
assert.strictEqual(specifier, 'x');
assert.strictEqual(referrer, f);
return module;
},
}),
});
f().then((ns) => {
assert.strictEqual(ns, module.namespace);
});
}).then(common.mustCall());
}
4 changes: 2 additions & 2 deletions test/parallel/test-vm-module-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ async function asserts() {
const m = new SourceTextModule(`
import "foo" with { n1: 'v1', n2: 'v2' };
`, { identifier: 'm' });
await m.link((s, r, p) => {
await m.link(common.mustCall((s, r, p) => {
assert.strictEqual(s, 'foo');
assert.strictEqual(r.identifier, 'm');
assert.strictEqual(p.attributes.n1, 'v1');
assert.strictEqual(p.assert.n1, 'v1');
assert.strictEqual(p.attributes.n2, 'v2');
assert.strictEqual(p.assert.n2, 'v2');
return new SourceTextModule('');
});
}));
}

const finished = common.mustCall();
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-watch-file-shared-dependency.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ describe('watch file with shared dependency', () => {
const controller = new AbortController();
const watcher = new FilesWatcher({ signal: controller.signal });

watcher.on('changed', ({ owners }) => {
watcher.on('changed', common.mustCall(({ owners }) => {
if (owners.size !== 2) return;

// If this code is never reached the test times out.
assert.ok(owners.has(fixturePaths['test.js']));
assert.ok(owners.has(fixturePaths['test-2.js']));
controller.abort();
done();
});
}));
watcher.filterFile(fixturePaths['test.js']);
watcher.filterFile(fixturePaths['test-2.js']);
watcher.filterFile(fixturePaths['dependency.js'], fixturePaths['test.js']);
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-weakref.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

// Flags: --expose-gc

require('../common');
const common = require('../common');
const assert = require('assert');

const w = new globalThis.WeakRef({});

setTimeout(() => {
setTimeout(common.mustCall(() => {
globalThis.gc();
assert.strictEqual(w.deref(), undefined);
}, 200);
}), 200);
10 changes: 5 additions & 5 deletions test/parallel/test-web-locks-query.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

require('../common');
const common = require('../common');
const { describe, it } = require('node:test');
const assert = require('node:assert');
const { Worker } = require('worker_threads');
Expand All @@ -26,7 +26,7 @@ describe('Web Locks - query missing WPT tests', () => {
worker.once('message', resolve);
});

await navigator.locks.request('different-contexts-resource', { mode: 'shared' }, async (lock) => {
await navigator.locks.request('different-contexts-resource', { mode: 'shared' }, common.mustCall(async (lock) => {
const state = await navigator.locks.query();
const heldLocks = state.held.filter((l) => l.name === 'different-contexts-resource');

Expand All @@ -35,7 +35,7 @@ describe('Web Locks - query missing WPT tests', () => {
assert.notStrictEqual(mainClientId, workerResult.clientId);

worker.postMessage('release');
});
}));

await worker.terminate();
});
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Web Locks - query missing WPT tests', () => {
});
assert.strictEqual(step1.acquired, 'resource1');

await navigator.locks.request('deadlock-resource-2', async (lock2) => {
await navigator.locks.request('deadlock-resource-2', common.mustCall(async (lock2) => {
worker.postMessage('try-resource2');

const step2 = await new Promise((resolve) => {
Expand All @@ -85,7 +85,7 @@ describe('Web Locks - query missing WPT tests', () => {
assert(resource2Lock);

worker.postMessage('release');
});
}));

await worker.terminate();
});
Expand Down
54 changes: 28 additions & 26 deletions test/parallel/test-web-locks.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ describe('Web Locks with worker threads', () => {
assert.strictEqual(result.success, true);
await worker.terminate();

await navigator.locks.request('exclusive-test', async (lock) => {
await navigator.locks.request('exclusive-test', common.mustCall(async (lock) => {
assert.strictEqual(lock.mode, 'exclusive');
assert.strictEqual(lock.name, 'exclusive-test');
});
}));
});

it('should handle shared locks', async () => {
Expand All @@ -48,41 +48,43 @@ describe('Web Locks with worker threads', () => {
});
assert.strictEqual(result.success, true);

await navigator.locks.request('shared-test', { mode: 'shared' }, async (lock1) => {
await navigator.locks.request('shared-test', { mode: 'shared' }, async (lock2) => {
await navigator.locks.request('shared-test', { mode: 'shared' }, common.mustCall(async (lock1) => {
await navigator.locks.request('shared-test', { mode: 'shared' }, common.mustCall(async (lock2) => {
assert.strictEqual(lock1.mode, 'shared');
assert.strictEqual(lock2.mode, 'shared');
});
});
}));
}));

await worker.terminate();
});

it('should handle steal option - no existing lock', async () => {
await navigator.locks.request('steal-simple', { steal: true }, async (lock) => {
await navigator.locks.request('steal-simple', { steal: true }, common.mustCall(async (lock) => {
assert.strictEqual(lock.name, 'steal-simple');
assert.strictEqual(lock.mode, 'exclusive');
});
}));
});

it('should handle steal option - existing lock', async () => {
let originalLockRejected = false;

const originalLockPromise = navigator.locks.request('steal-target', async (lock) => {
const originalLockPromise = navigator.locks.request('steal-target', common.mustCall(async (lock) => {
assert.strictEqual(lock.name, 'steal-target');
return 'original-completed';
}).catch((err) => {
})).catch(common.mustCall((err) => {
originalLockRejected = true;
assert.strictEqual(err.name, 'AbortError');
assert.strictEqual(err.message, 'The operation was aborted');
return 'original-rejected';
});
}));

const stealResult = await navigator.locks.request('steal-target', { steal: true }, async (stolenLock) => {
assert.strictEqual(stolenLock.name, 'steal-target');
assert.strictEqual(stolenLock.mode, 'exclusive');
return 'steal-completed';
});
const stealResult = await navigator.locks.request(
'steal-target', { steal: true },
common.mustCall(async (stolenLock) => {
assert.strictEqual(stolenLock.name, 'steal-target');
assert.strictEqual(stolenLock.mode, 'exclusive');
return 'steal-completed';
}));

assert.strictEqual(stealResult, 'steal-completed');

Expand All @@ -92,7 +94,7 @@ describe('Web Locks with worker threads', () => {
});

it('should handle ifAvailable option', async () => {
await navigator.locks.request('ifavailable-test', async () => {
await navigator.locks.request('ifavailable-test', common.mustCall(async () => {
const result = await navigator.locks.request('ifavailable-test', { ifAvailable: true }, (lock) => {
return lock; // should be null
});
Expand All @@ -105,7 +107,7 @@ describe('Web Locks with worker threads', () => {
});

assert.strictEqual(availableResult, true);
});
}));
});

it('should handle AbortSignal', async () => {
Expand Down Expand Up @@ -179,18 +181,18 @@ describe('Web Locks with worker threads', () => {
const als = new AsyncLocalStorage();
const store = { id: 'lock' };

als.run(store, () => {
als.run(store, common.mustCall(() => {
navigator.locks
.request('als-context-test', async () => {
.request('als-context-test', common.mustCall(async () => {
assert.strictEqual(als.getStore(), store);
})
}))
.then(common.mustCall());
});
}));
});

it('should clean up when worker is terminated with a pending lock', async () => {
// Acquire the lock in the main thread so that the worker's request will be pending
await navigator.locks.request('cleanup-test', async () => {
await navigator.locks.request('cleanup-test', common.mustCall(async () => {
// Launch a worker that requests the same lock
const worker = new Worker(`
const { parentPort } = require('worker_threads');
Expand All @@ -212,11 +214,11 @@ describe('Web Locks with worker threads', () => {

await worker.terminate();

});
}));

// Request the lock again to make sure cleanup succeeded
await navigator.locks.request('cleanup-test', async (lock) => {
await navigator.locks.request('cleanup-test', common.mustCall(async (lock) => {
assert.strictEqual(lock.name, 'cleanup-test');
});
}));
});
});
4 changes: 2 additions & 2 deletions test/parallel/test-webcrypto-cryptokey-workers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ async function doSig(key) {
}

if (process.env.HAS_STARTED_WORKER) {
return parentPort.once('message', (key) => {
return parentPort.once('message', common.mustCall((key) => {
assert.strictEqual(key.algorithm.name, 'HMAC');
doSig(key).then(common.mustCall());
});
}));
}

// Don't use isMainThread to allow running this test inside a worker.
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-webcrypto-digest.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ const kData = (new TextEncoder()).encode('hello');

// Compare that the legacy crypto API and SubtleCrypto API
// produce the same results
(await values).forEach((v) => {
for (const v of await values) {
assert(v instanceof ArrayBuffer);
assert.strictEqual(checkValue, Buffer.from(v).toString('hex'));
});
}
}));
})().then(common.mustCall());

Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-webstreams-clone-unref.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

require('../common');
const { ok } = require('node:assert');
const assert = require('node:assert');

// This test verifies that cloned ReadableStream and WritableStream instances
// do not keep the process alive. The test fails if it timesout (it should just
Expand All @@ -12,5 +12,5 @@ const ws1 = new WritableStream();

const [rs2, ws2] = structuredClone([rs1, ws1], { transfer: [rs1, ws1] });

ok(rs2 instanceof ReadableStream);
ok(ws2 instanceof WritableStream);
assert.ok(rs2 instanceof ReadableStream);
assert.ok(ws2 instanceof WritableStream);
Loading