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 <anna@addaleax.net>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
puzpuzpuz authored and vdeturckheim committed Mar 2, 2020
1 parent 4c35b62 commit 68e36ad
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
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 68e36ad

Please sign in to comment.