( this: unknown, fn: AroundAllListener<ExtraContext>, timeout?: number, )
| 321 | * ``` |
| 322 | */ |
| 323 | export function aroundAll<ExtraContext = object>( |
| 324 | this: unknown, |
| 325 | fn: AroundAllListener<ExtraContext>, |
| 326 | timeout?: number, |
| 327 | ): void { |
| 328 | assertTypes(fn, '"aroundAll" callback', ['function']) |
| 329 | const stackTraceError = new Error('STACK_TRACE_ERROR') |
| 330 | const resolvedTimeout = timeout ?? getDefaultHookTimeout() |
| 331 | const context = getChainableContext(this) |
| 332 | |
| 333 | return getCurrentSuite().on( |
| 334 | 'aroundAll', |
| 335 | Object.assign( |
| 336 | withSuiteFixtures( |
| 337 | 'aroundAll', |
| 338 | fn, |
| 339 | context, |
| 340 | stackTraceError, |
| 341 | 1, |
| 342 | ) as RegisteredAroundAllListener, |
| 343 | { |
| 344 | [AROUND_TIMEOUT_KEY]: resolvedTimeout, |
| 345 | [AROUND_STACK_TRACE_KEY]: stackTraceError, |
| 346 | }, |
| 347 | ), |
| 348 | ) |
| 349 | } |
| 350 | |
| 351 | /** |
| 352 | * Registers a callback function that wraps around each test within the current suite. |
nothing calls this directly
no test coverage detected