({
hook,
test,
describeBlock,
testContext = {},
}: {
hook: Circus.Hook;
describeBlock?: Circus.DescribeBlock;
test?: Circus.TestEntry;
testContext?: Circus.TestContext;
})
| 244 | }; |
| 245 | |
| 246 | const _callCircusHook = async ({ |
| 247 | hook, |
| 248 | test, |
| 249 | describeBlock, |
| 250 | testContext = {}, |
| 251 | }: { |
| 252 | hook: Circus.Hook; |
| 253 | describeBlock?: Circus.DescribeBlock; |
| 254 | test?: Circus.TestEntry; |
| 255 | testContext?: Circus.TestContext; |
| 256 | }): Promise<void> => { |
| 257 | await dispatch({hook, name: 'hook_start'}); |
| 258 | const timeout = hook.timeout || getState().testTimeout; |
| 259 | |
| 260 | try { |
| 261 | await callAsyncCircusFn(hook, testContext, { |
| 262 | isHook: true, |
| 263 | timeout, |
| 264 | }); |
| 265 | await dispatch({describeBlock, hook, name: 'hook_success', test}); |
| 266 | } catch (error) { |
| 267 | await dispatch({describeBlock, error, hook, name: 'hook_failure', test}); |
| 268 | } |
| 269 | }; |
| 270 | |
| 271 | const _callCircusTest = async ( |
| 272 | test: Circus.TestEntry, |
no test coverage detected