Files
component-detection-depende…/componentDetection.test.ts
Justin Hutchings bcaa41e34f Update docs for ownership change (#2)
* Add files to prepare for ownership change

* Fix tests

* Update repo name

* Update dependencies

* Attempt to fix permissions issues blocking test

* Update permissions

* Add environment variable

* Fix variable name

* Update test.yml

* Update test.yml
2023-04-07 16:21:17 -07:00

20 lines
701 B
TypeScript

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