* Only test a subset of tests with, e.g., `?1-10` in the URL. * Can be used together with ` ` * Sample usage: * for (const test of tests) { * subsetTest(async_test, test.fn, test.name); * }
(testFunc, ...args)
| 49 | * } |
| 50 | */ |
| 51 | function subsetTest(testFunc, ...args) { |
| 52 | currentSubTest++; |
| 53 | if (shouldRunSubTest(currentSubTest)) { |
| 54 | return testFunc(...args); |
| 55 | } |
| 56 | return null; |
| 57 | } |
| 58 | self.shouldRunSubTest = shouldRunSubTest; |
| 59 | self.subsetTest = subsetTest; |
| 60 | })(); |
no test coverage detected