test: convert test-async-local-storage-bind to async loop

Signed-off-by: freida-code <150387862+freida-code@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65270
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
This commit is contained in:
freida-code authored and Antoine du Hamel committed 2026-08-26 00:56:07 +02:00
1 parent 1d5e5e8f43
commit c644f2e07c
1 file changed
+2 -2
@@ -4,11 +4,11 @@ const common = require('../common');
const assert = require('assert');
const { AsyncLocalStorage } = require('async_hooks');
[1, false, '', {}, []].forEach((i) => {
for (const i of [1, false, '', {}, []]) {
assert.throws(() => AsyncLocalStorage.bind(i), {
code: 'ERR_INVALID_ARG_TYPE'
});
});
}
const fn = common.mustCall(AsyncLocalStorage.bind(() => 123));
assert.strictEqual(fn(), 123);