Skip to content

Commit 4d50975

Browse files
PhakornKiongMylesBorins
authored andcommittedApr 4, 2021
test: improve clarity of ALS-enable-disable.js
The last als.run() will reactivate the als, hence the test should test for getting the object, not undefined PR-URL: #38008 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 0709cbb commit 4d50975

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎test/async-hooks/test-async-local-storage-enable-disable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ asyncLocalStorage.run(new Map(), () => {
2424

2525
process.nextTick(() => {
2626
assert.strictEqual(asyncLocalStorage.getStore(), undefined);
27-
asyncLocalStorage.run(new Map(), () => {
28-
assert.notStrictEqual(asyncLocalStorage.getStore(), undefined);
27+
asyncLocalStorage.run(new Map().set('bar', 'foo'), () => {
28+
assert.strictEqual(asyncLocalStorage.getStore().get('bar'), 'foo');
2929
});
3030
});
3131
});

0 commit comments

Comments
 (0)