Skip to content

Commit f5c39d7

Browse files
committed
Improve error message for empty array
When `jest-codemods` was run, it replaced the error message `array.join` by a comment for the error message. Since Jest does not support custom error messages out-of-the-box, this will instead do an equality check with an empty array, which will ensure that the received array is printed.
1 parent ec60f3f commit f5c39d7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

extensions/ql-vscode/test/pure-tests/sarif-processing.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,7 @@ describe("SARIF processing", () => {
645645

646646
function expectNoParsingError(result: { errors: string[] }) {
647647
const array = result.errors;
648-
// array.join()
649-
expect(array.length).toBe(0);
648+
expect(array).toEqual([]);
650649
}
651650

652651
function buildValidSarifLog(): sarif.Log {

0 commit comments

Comments
 (0)