diff --git a/src/environment/listener.ts b/src/environment/listener.ts index 44af884..93a5efb 100644 --- a/src/environment/listener.ts +++ b/src/environment/listener.ts @@ -17,9 +17,10 @@ const listener: EnvironmentListenerFn = (context) => { .on('test_environment_setup', setWorkerId) .on('add_hook', addHookType) .on('add_hook', addSourceLocation) + .on('add_hook', addSourceCode) .on('add_test', addSourceLocation) + .on('add_test', addSourceCode) .on('run_start', flush) - .on('hook_start', addSourceCode) .on('hook_start', executableStart) .on('hook_failure', executableFailure) .on('hook_failure', flush) @@ -29,7 +30,6 @@ const listener: EnvironmentListenerFn = (context) => { .on('test_todo', testSkip) .on('test_skip', testSkip) .on('test_done', testDone) - .on('test_fn_start', addSourceCode) .on('test_fn_start', executableStart) .on('test_fn_success', executableSuccess) .on('test_fn_success', flush) @@ -93,9 +93,9 @@ function addHookType({ event }: TestEnvironmentCircusEvent>, resultKey: ResultKey, ): Promise { - return resolvePromisedProperties(preparePromisedItem(context, extractor, resultKey)); + return await resolvePromisedProperties( + preparePromisedItem(context, extractor, resultKey), + ); } function preparePromisedItem(