Skip to content

Commit

Permalink
test: improve disable AsyncLocalStorage test
Browse files Browse the repository at this point in the history
  • Loading branch information
puzpuzpuz committed Mar 2, 2020
1 parent 6bcea0a commit d0f9175
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 d0f9175

Please sign in to comment.