From eb64cb389ae1c8584ebe09535c624ca5a868dcd2 Mon Sep 17 00:00:00 2001 From: Andrey Pechkurov Date: Fri, 28 Feb 2020 10:07:47 +0300 Subject: [PATCH] test: improve disable AsyncLocalStorage test PR-URL: https://github.com/nodejs/node/pull/31998 Reviewed-By: Anna Henningsen Reviewed-By: Vladimir de Turckheim Reviewed-By: James M Snell --- test/async-hooks/test-async-local-storage-enable-disable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/async-hooks/test-async-local-storage-enable-disable.js b/test/async-hooks/test-async-local-storage-enable-disable.js index bbba8cde58d7e8..22a3f5f6c8c43f 100644 --- a/test/async-hooks/test-async-local-storage-enable-disable.js +++ b/test/async-hooks/test-async-local-storage-enable-disable.js @@ -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(() => {