Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalosh committed Sep 19, 2019
1 parent 3c3b0d6 commit cd80475
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit/ErrorHandler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ describe("ErrorHandler", () => {
statusCode: 600,
};

const postmarkError = errorHandler.generateError(error);
expect(postmarkError).to.be.an.instanceof(Errors.PostmarkError);
expect(postmarkError.name).to.equal("UnknownError");
expect(postmarkError.message).to.equal(error.message);
});

it("postmark error", () => {
const errorHandler = new ErrorHandler();

const error: any = {
name: "Test name",
message: "test message"
};

const postmarkError = errorHandler.generateError(error);
expect(postmarkError).to.be.an.instanceof(Errors.PostmarkError);
expect(postmarkError.name).to.equal("PostmarkError");
Expand Down

0 comments on commit cd80475

Please sign in to comment.