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
  • Loading branch information
PhakornKiong committed Apr 1, 2021
1 parent 82bc5c3 commit 7920390
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 7920390

Please sign in to comment.