Files
component-detection-depende…/componentDetection.test.ts
T

17 lines
533 B
TypeScript
Raw Normal View History

2023-01-22 20:19:41 +00:00
import ComponentDetection from './componentDetection';
import fs from 'fs';
test('Downloads CLI', async () => {
2023-01-22 20:19:41 +00:00
ComponentDetection.downloadLatestRelease();
expect(fs.existsSync(ComponentDetection.componentDetectionPath));
});
test('Runs CLI', async () => {
2023-01-22 20:24:06 +00:00
await ComponentDetection.runComponentDetection('./test');
2023-01-22 20:19:41 +00:00
expect(fs.existsSync(ComponentDetection.outputPath));
2023-01-22 01:06:08 +00:00
});
test('Parses CLI output', async () => {
2023-01-22 20:19:41 +00:00
var manifests = await ComponentDetection.getManifestsFromResults();
expect(manifests?.length == 2);
});