(prerequisite: boolean | (() => boolean))
| 6 | import { is } from '../../src/Utility/System/guards'; |
| 7 | |
| 8 | export function when(prerequisite: boolean | (() => boolean)): {it: Mocha.TestFunction} { |
| 9 | if (is.function(prerequisite)) { |
| 10 | prerequisite = prerequisite(); |
| 11 | } |
| 12 | if (prerequisite) { |
| 13 | return {it}; |
| 14 | } else { |
| 15 | const skip = (title: string, test: AsyncFunc | Func) => it.skip(`Dynamically skipping test: <<${title}>> - prerequisite not met.`, test); |
| 16 | return {it:skip as Mocha.TestFunction}; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | import { MessagePort } from 'worker_threads'; |
| 21 | import { collectGarbage } from '../../src/Utility/System/garbageCollector'; |
no test coverage detected