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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
PhakornKiong authored and MylesBorins committed Apr 4, 2021
1 parent 0709cbb commit 4d50975
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
Original file line number Diff line number Diff line change
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 4d50975

Please sign in to comment.