Skip to content

Commit

Permalink
Check parse error message with RegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
kayahr committed Dec 31, 2023
1 parent 9c476bf commit 4e09811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/Journal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ describe("Journal", () => {
expect(event).toBeDefined();
}
})();
await expect(promise).rejects.toThrow("Parse error in Journal.2023-01-01T000000.01.log:2: "
+ "Expected double-quoted property name in JSON at position 38: { \"timestamp\":\"2023-01-01T00:00:01Z\", ]");
await expect(promise).rejects.toThrow(
/Parse error in Journal\.2023-01-01T000000\.01\.log:2: .* at position 38: \{ "timestamp":"2023-01-01T00:00:01Z", ]/);
} finally {
await journal.close();
}
Expand Down

0 comments on commit 4e09811

Please sign in to comment.