Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
In newer versions of node the error name is changed so it's tested by regexp instead of full match
  • Loading branch information
Filippo Conti committed Aug 5, 2019
1 parent 19b84da commit 75cf2f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("module", () => {
.expect("code", 0)
.end((err) => {
expect(err).toBeDefined();
expect(err.name).toMatch("[ERR_ASSERTION]");
expect(err.name).toMatch("AssertionError");
done();
});
});
Expand Down Expand Up @@ -144,7 +144,7 @@ describe("module", () => {
}).expect("stdout", "no write")
.end();
return expect(p).rejects.toMatchObject({
name: "AssertionError [ERR_ASSERTION]",
name: /AssertionError/,
});
});

Expand Down

0 comments on commit 75cf2f3

Please sign in to comment.