File tree Expand file tree Collapse file tree 2 files changed +3
-50
lines changed
test/node-api/test_async_context Expand file tree Collapse file tree 2 files changed +3
-50
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,10 @@ setImmediate(() => {
5050 assert . strictEqual ( hook_result . destroy_called , false ) ;
5151 makeCallback ( asyncResource , process , ( ) => {
5252 const executionAsyncResource = async_hooks . executionAsyncResource ( ) ;
53- // Assuming the executionAsyncResource was created for the absence of the
54- // initial `{ foo: 'bar' }`.
55- // This is the worst path of `napi_async_context` related API of
56- // recovering from the condition and not break the executionAsyncResource
57- // shape, although the executionAsyncResource might not be correct.
53+ // Previous versions of Node-API would have gargbage-collected
54+ // the `asyncResource` object, now we can just assert that it is intact.
5855 assert . strictEqual ( typeof executionAsyncResource , 'object' ) ;
59- assert . strictEqual ( executionAsyncResource . foo , undefined ) ;
56+ assert . strictEqual ( executionAsyncResource . foo , 'bar' ) ;
6057 destroyAsyncResource ( asyncResource ) ;
6158 setImmediate ( ( ) => {
6259 assert . strictEqual ( hook_result . destroy_called , true ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments