-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Emily Rodriguez <[email protected]>
- Loading branch information
Emily Rodriguez
committed
Apr 20, 2023
1 parent
6a4490d
commit f5855f3
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
const path = require('path'); | ||
const saf_action = require('../index.js'); | ||
const saf_action = require('../run_command.js'); | ||
|
||
describe('SAF Action tests', () => { | ||
it('should run SAF with a space topic separator in the command string', async () => { | ||
let inputFilePath = path.resolve('./test/sample_data/red_hat_good.json'); | ||
process.env['INPUT_COMMAND_STRING'] = `view summary -i ${inputFilePath}`; | ||
require('../index.js'); | ||
await saf_action(); | ||
await saf_action({safCLIPath: "./node_modules/@mitre/saf/lib/index.js"}); | ||
delete process.env['INPUT_COMMAND_STRING']; | ||
}); | ||
it('should run SAF with a semicolon topic separator in the command string', async () => { | ||
it('should run SAF with a colon topic separator in the command string', async () => { | ||
let inputFilePath = path.resolve('./test/sample_data/red_hat_good.json'); | ||
process.env['INPUT_COMMAND_STRING'] = `view:summary -i ${inputFilePath}`; | ||
await saf_action(); | ||
await saf_action({safCLIPath: "./node_modules/@mitre/saf/lib/index.js"}); | ||
delete process.env['INPUT_COMMAND_STRING']; | ||
}); | ||
}); |