( describe: Circus.DescribeBlock, )
| 111 | }; |
| 112 | |
| 113 | export const getAllHooksForDescribe = ( |
| 114 | describe: Circus.DescribeBlock, |
| 115 | ): DescribeHooks => { |
| 116 | const result: DescribeHooks = { |
| 117 | afterAll: [], |
| 118 | beforeAll: [], |
| 119 | }; |
| 120 | |
| 121 | if (hasEnabledTest(describe)) { |
| 122 | for (const hook of describe.hooks) { |
| 123 | switch (hook.type) { |
| 124 | case 'beforeAll': |
| 125 | result.beforeAll.push(hook); |
| 126 | break; |
| 127 | case 'afterAll': |
| 128 | result.afterAll.push(hook); |
| 129 | break; |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | return result; |
| 135 | }; |
| 136 | |
| 137 | type TestHooks = { |
| 138 | beforeEach: Array<Circus.Hook>; |
no test coverage detected