Skip to content

Commit

Permalink
test for capturing hard failure
Browse files Browse the repository at this point in the history
  • Loading branch information
GregRos committed Sep 6, 2023
1 parent 9d1cec9 commit 51debff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parjs",
"version": "0.15.1",
"version": "0.15.2",
"repository": "https://github.com/GregRos/parjs",
"homepage": "https://github.com/GregRos/parjs",
"exports": {
Expand Down
5 changes: 4 additions & 1 deletion src/test/unit/combinators/recovery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ describe("expects combinator", () => {
});
});
it("modifies expecting", () => {
const parser = base.pipe(reason(x => `${x.reason}! gottem!`));
const parser = base.pipe(
then(fail("deez nuts")),
reason(x => `${x.reason}! gottem!`)
);
expect(parser.parse("abc")).toBeLike({
kind: "Soft",
reason: "deez nuts! gottem!"
Expand Down

0 comments on commit 51debff

Please sign in to comment.