Skip to content

Commit 1a0c36e

Browse files
authored
test: JSON parse assert works with newer messages (#1639)
1 parent 3b3138d commit 1a0c36e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/input/findReportedConfiguration.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ describe("findReportedConfiguration", () => {
3737
const result = await findReportedConfiguration(exec, "command", "sample.json");
3838

3939
// Assert
40-
expect(result).toEqual(
41-
new Error(
42-
"Error parsing configuration: SyntaxError: Unexpected token i in JSON at position 0",
43-
),
40+
expect(result).toBeInstanceOf(Error);
41+
expect((result as Error).message).toMatch(
42+
/Error parsing configuration: SyntaxError: Unexpected token '?i/,
4443
);
4544
});
4645

0 commit comments

Comments
 (0)