test('tempDirectory.create --tmpDir:', async (t) => { t.plan(2); await tempDirectory.create(contextTmpDir); t.ok( contextTmpDir.path.match(/thisisatest[/\\].*-.*-.*-.*-.*/), 'the path should match --tmpDir' ); const stats = await stat(contextTmpDir.path); t.ok(stats.isDirectory(), 'the path should exist and be a folder'); await rimraf('./.thisisatest'); });
async function remove(context) { if (!context.path) { return; } context.emit( 'data', 'silly', `${context.module.name} rm.tempdir`, context.path ); await rimraf(context.path); }
test.after.always('cleanup', () => { return Promise.all([ rimraf('test/tempCompDir'), ]); });
test('yarn-test: teardown', async () => { await rimraf(sandbox); });
/** * Collect and combine doc files in proper order. * * @param {DocsConfigSet} docsConfigSet - Configurations for collating docs * @returns {Promise} promise */ async function collateFiles(docsConfigSet) { const { docsRoot } = docsConfigSet; await mkdirp(docsRoot); await rimraf(path.join(docsRoot, '*')); // flatten the moduleDocsConfigs then generate const flattened = ['plugins', 'presets', 'modules'].reduce((acc, type) => { return acc.concat(docsConfigSet[type]); }, [docsConfigSet.app]); await Promise.all(flattened.map(docsConfig => collateFiles.processModule(docsConfig, docsConfigSet))); }
test('reporter.junit(): teardown', async () => { await rimraf(sandbox); });
test('reporter.tap(): teardown', async () => { await rimraf(sandbox); });
test('npm-install: teardown', async () => { await rimraf(sandbox); });
test('grab-project: teardown', async () => { await rimraf(sandbox); });
test('npm-test: teardown', async () => { await rimraf(sandbox); });
test('yarn-install: teardown', async () => { await rimraf(sandbox); });
/** * Collect and combine doc files in proper order. * * @param {DocsConfigSet} docsConfigSet - Configurations for collating docs * @returns {Promise} promise */ async function collateFiles(docsConfigSet) { const { docsRoot } = docsConfigSet; await mkdirp(docsRoot); await rimraf(path.join(docsRoot, '*')); // flatten the moduleDocsConfigs then generate const flattened = ['plugins', 'presets', 'modules'].reduce((acc, type) => { return acc.concat(docsConfigSet[type]); }, [docsConfigSet.app]); await Promise.all(flattened.map(docsConfig => collateFiles.processModule(docsConfig, docsConfigSet))); }