Skip to content

Commit

Permalink
test: improve disable AsyncLocalStorage test
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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 committed Apr 14, 2020
1 parent bedb27e commit be305fe
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 be305fe

Please sign in to comment.