* 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
20 lines
701 B
TypeScript
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);
|
|
}); |