* @template {TestConfigBase} C * @param {string} samplesDirectory * @param {(directory: string, config: C) => void} runTest * @param {Mocha.Func} onTeardown
(samplesDirectory, runTest, onTeardown)
| 234 | * @param {Mocha.Func} onTeardown |
| 235 | */ |
| 236 | function runSamples(samplesDirectory, runTest, onTeardown) { |
| 237 | if (onTeardown) { |
| 238 | afterEach(onTeardown); |
| 239 | } |
| 240 | |
| 241 | for (const fileName of readdirSync(samplesDirectory) |
| 242 | .filter(name => name[0] !== '.') |
| 243 | .sort()) { |
| 244 | runTestsInDirectory(path.join(samplesDirectory, fileName), runTest); |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * @template {TestConfigBase} C |
no test coverage detected
searching dependent graphs…