Skip to content

Commit

Permalink
test: improve disable AsyncLocalStorage test
Browse files Browse the repository at this point in the history
PR-URL: #31998
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
puzpuzpuz authored and codebytere committed Mar 3, 2020
1 parent cd30dbb commit 9325634
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/async-hooks/test-async-local-storage-enable-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ asyncLocalStorage.runSyncAndReturn(new Map(), () => {
asyncLocalStorage.getStore().set('foo', 'bar');
process.nextTick(() => {
assert.strictEqual(asyncLocalStorage.getStore().get('foo'), 'bar');
process.nextTick(() => {
assert.strictEqual(asyncLocalStorage.getStore(), undefined);
});
asyncLocalStorage.disable();
assert.strictEqual(asyncLocalStorage.getStore(), undefined);
process.nextTick(() => {
Expand Down

0 comments on commit 9325634

Please sign in to comment.