Wrap a describe block to skip entirely if none of its tests are selected.
(name: string, testNames: string[], fn: () => void)
| 47 | |
| 48 | /** Wrap a describe block to skip entirely if none of its tests are selected. */ |
| 49 | function describeIfSelected(name: string, testNames: string[], fn: () => void) { |
| 50 | const anySelected = selectedTests === null || testNames.some(t => selectedTests!.includes(t)); |
| 51 | (anySelected ? describeE2E : describe.skip)(name, fn); |
| 52 | } |
| 53 | |
| 54 | /** Skip an individual test if not selected (for multi-test describe blocks). */ |
| 55 | function testIfSelected(testName: string, fn: () => Promise<void>, timeout: number) { |