Skip to content

Commit

Permalink
test: improve clarity of ALS-enable-disable.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
PhakornKiong authored and targos committed May 1, 2021
1 parent 69c4bfd commit abec939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/async-hooks/test-async-local-storage-enable-disable.js
Expand Up @@ -24,8 +24,8 @@ asyncLocalStorage.run(new Map(), () => {

process.nextTick(() => {
assert.strictEqual(asyncLocalStorage.getStore(), undefined);
asyncLocalStorage.run(new Map(), () => {
assert.notStrictEqual(asyncLocalStorage.getStore(), undefined);
asyncLocalStorage.run(new Map().set('bar', 'foo'), () => {
assert.strictEqual(asyncLocalStorage.getStore().get('bar'), 'foo');
});
});
});
Expand Down

0 comments on commit abec939

Please sign in to comment.