aboutsummaryrefslogtreecommitdiff
path: root/src/errors.test.ts
blob: 235c0d2d1ede6c435f21bca488503abcae0c0ef6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { InvalidReportDocumentError, BranchNotFoundError } from "./errors";

describe("InvalidReportDocumentError", () => {
  it("should have the correct name and default message", () => {
    // Arrange

    // Act
    const err = new InvalidReportDocumentError();

    // Assert
    expect(err.name).toEqual("InvalidReportDocumentError");
    expect(err.message).toEqual("Invalid report document");
  });
});

describe("BranchNotFoundError", () => {
  it("should have the correct name and default message", () => {
    // Arrange

    // Act
    const err = new BranchNotFoundError();

    // Assert
    expect(err.name).toEqual("BranchNotFoundError");
    expect(err.message).toEqual("Branch not found");
  });
});