MCPcopy
hub / github.com/rollup/rollup / runSamples

Function runSamples

test/testHelpers.js:236–246  ·  view source on GitHub ↗

* @template {TestConfigBase} C * @param {string} samplesDirectory * @param {(directory: string, config: C) => void} runTest * @param {Mocha.Func} onTeardown

(samplesDirectory, runTest, onTeardown)

Source from the content-addressed store, hash-verified

234 * @param {Mocha.Func} onTeardown
235 */
236function 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

Callers 2

runTestSuiteWithSamplesFunction · 0.85
testHelpers.jsFile · 0.85

Calls 1

runTestsInDirectoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…