test: improve clarity of ALS-enable-disable.js

The last als.run() will reactivate the als,
hence the test should test for getting the object,
not undefined

PR-URL: https://github.com/nodejs/node/pull/38008
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Darkripper214 authored and Myles Borins committed 2021-04-04 15:27:05 -04:00
1 parent 0709cbb7fe
commit 4d50975cd7
1 file changed
+2 -2
@@ -24,8 +24,8 @@ asyncLocalStorage.run(new Map(), () => {
process.nextTick(() => {
assert.strictEqual(asyncLocalStorage.getStore(), undefined);
asyncLocalStorage.run(new Map(), () => {
assert.notStrictEqual(asyncLocalStorage.getStore(), undefined);
asyncLocalStorage.run(new Map().set('bar', 'foo'), () => {
assert.strictEqual(asyncLocalStorage.getStore().get('bar'), 'foo');
});
});
});