Skip to content

Commit

Permalink
Remove __dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
Or-Geva committed Oct 15, 2023
1 parent 907ac96 commit e1baf3e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/test/tests/appsConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('JFrog Apps Config Tests', () => {
{ excludeScanners: [ExcludeScannerName.Secrets, ExcludeScannerName.ContextualAnalysis] as ExcludeScannerName[], shouldSkip: true }
].forEach(testCase => {
it('Should skip scanner - ' + testCase.excludeScanners, () => {
let module: AppsConfigModule = new AppsConfigModule(__dirname, { exclude_scanners: testCase.excludeScanners } as Module);
let module: AppsConfigModule = new AppsConfigModule('', { exclude_scanners: testCase.excludeScanners } as Module);
assert.equal(module.ShouldSkipScanner(ScanType.AnalyzeApplicability), testCase.shouldSkip);
});
});
Expand Down Expand Up @@ -96,7 +96,7 @@ describe('JFrog Apps Config Tests', () => {
{ scanner: { exclude_patterns: ['exclude-dir-1', 'exclude-dir-2'] } as Scanner }
].forEach(testCase => {
it('Get exclude patterns - ' + testCase.scanner?.exclude_patterns, () => {
let module: AppsConfigModule = new AppsConfigModule(__dirname, {
let module: AppsConfigModule = new AppsConfigModule('', {
exclude_patterns: ['exclude-root'],
scanners: { secrets: testCase?.scanner }
} as Module);
Expand Down
2 changes: 1 addition & 1 deletion src/test/tests/iacScan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('Iac Scan Tests', () => {
createTestStepProgress(),
{} as ConnectionManager,
logManager,
new AppsConfigModule(__dirname)
new AppsConfigModule('')
);
}
});
2 changes: 1 addition & 1 deletion src/test/tests/integration/iac.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Iac Integration Tests', async () => {
createTestStepProgress(),
integrationManager.connectionManager,
integrationManager.logManager,
new AppsConfigModule(__dirname),
new AppsConfigModule(testDataRoot),
integrationManager.resource
);
runner.verbose = true;
Expand Down
2 changes: 1 addition & 1 deletion src/test/tests/integration/secrets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Secrets Scan Integration Tests', async () => {
createTestStepProgress(),
integrationManager.connectionManager,
integrationManager.logManager,
new AppsConfigModule(__dirname),
new AppsConfigModule(testDataRoot),
integrationManager.resource
);
runner.verbose = true;
Expand Down
2 changes: 1 addition & 1 deletion src/test/tests/sastScan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('Sast Tests', () => {
createTestStepProgress(),
{} as ConnectionManager,
logManager,
new AppsConfigModule(__dirname)
new AppsConfigModule('')
);
}
});
2 changes: 1 addition & 1 deletion src/test/tests/scanAnlayzerRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Analyzer BinaryRunner tests', async () => {
): Promise<void> {
await RunUtils.runWithTimeout(timeout, checkCancel, dummyAction());
}
})(connection, dummyName, logManager, new AppsConfigModule(__dirname));
})(connection, dummyName, logManager, new AppsConfigModule(''));
}

[
Expand Down
2 changes: 1 addition & 1 deletion src/test/tests/secretsScan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('Secrets Scan Tests', () => {
createTestStepProgress(),
{} as ConnectionManager,
logManager,
new AppsConfigModule(__dirname)
new AppsConfigModule('')
);
}
});

0 comments on commit e1baf3e

Please sign in to comment.