mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
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:
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);
|
||||
|
||||
Reference in new issue
Block a user