Skip to content

Commit ae92720

Browse files
committed
Merge remote-tracking branch 'origin/master' into v1
2 parents 6cb44f8 + 6f60fd6 commit ae92720

File tree

16 files changed

+7756
-4800
lines changed

16 files changed

+7756
-4800
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- main
6+
- master
77
- 'releases/*'
88

99
jobs:

clilauncher.test.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ const testInput = "test-resources/testInput.sarif"
66
const testOutput = "test-resources/output.sarif";
77
const expectedOutput = "test-resources/expected.sarif"
88

9-
afterAll(async () => {
10-
fs.unlink(testOutput, () => {});
11-
});
9+
describe('cli launcher tests', () => {
10+
afterEach((done) => {
11+
fs.unlink(testOutput, done);
12+
}, 15000);
1213

13-
test('changed sarif includes Secure Code Warrior info', async () => {
14-
await runner.run(testInput, testOutput, null, () => {});
14+
it('changed sarif includes Secure Code Warrior info', async () => {
15+
await runner.run(testInput, testOutput, null, () => {});
1516

16-
expect(fs.readFileSync(testOutput)).toEqual(fs.readFileSync(expectedOutput));
17-
});
17+
const jsonOutput = JSON.stringify(JSON.parse(fs.readFileSync(testOutput, { encoding: 'utf8' })), null, 2);
18+
const jsonExpected = JSON.stringify(JSON.parse(fs.readFileSync(expectedOutput, { encoding: 'utf8' })), null, 2);
1819

20+
expect(jsonOutput).toEqual(jsonExpected);
21+
}, 15000);
22+
});

0 commit comments

Comments
 (0)