MCPcopy Create free account
hub / github.com/nodejs/node / main

Function main

test/parallel/test-async-local-storage-enter-with.js:27–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27async function main() {
28 await asyncFunctionAfterAwait();
29 await promiseThen();
30 assert.strictEqual(als.getStore(), undefined);
31
32 // This is a known limitation of the `enterWith` API.
33 await asyncFunctionBeforeAwait();
34 assert.strictEqual(als.getStore(), 'before await');
35}
36
37main().then(common.mustCall());

Calls 4

asyncFunctionAfterAwaitFunction · 0.85
promiseThenFunction · 0.85
asyncFunctionBeforeAwaitFunction · 0.85
getStoreMethod · 0.45

Tested by

no test coverage detected