Skip to content

async_hooks,test: add test for async hooks parity for async/await

Add a basic test ensuring parity between before-after and init-promiseResolve hooks when using async/await.

Refs: https://github.com/nodejs/node/issues/20516

This is the first of a series of short commits adding a few conformance tests for async hooks. Using them will hopefully reduce the possibility of having regressions when we start to re-optimize the promises in V8. There will be separate tests in V8 as well.

Please feel free to give ideas about specific tests to include (the CLS use case is already planned) and if you prefer that I squash all the upcoming tests in a single commit or PR.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading