Files
component-detection-depende…/componentDetection.test.ts
Justin Hutchings ffddd794e2 Fix tests
2023-01-22 20:24:06 +00:00

17 lines
533 B
TypeScript

import ComponentDetection from './componentDetection';
import fs from 'fs';
test('Downloads CLI', async () => {
ComponentDetection.downloadLatestRelease();
expect(fs.existsSync(ComponentDetection.componentDetectionPath));
});
test('Runs CLI', async () => {
await ComponentDetection.runComponentDetection('./test');
expect(fs.existsSync(ComponentDetection.outputPath));
});
test('Parses CLI output', async () => {
var manifests = await ComponentDetection.getManifestsFromResults();
expect(manifests?.length == 2);
});