mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00
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:
parent
e79471deb7
commit
e46c680bf2
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user