astro-ghostcms/.pnpm-store/v3/files/b9/a9c5437100619629d647ad08b70...

17 lines
470 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import { GitError } from "./index";
describe("Error classes", () => {
describe("GitError class", () => {
let error: GitError;
beforeEach(() => {
error = new GitError(1, "Operation failed");
});
it("should be an instance of error", () => {
expect(error).toBeInstanceOf(Error);
});
it("should include error message and exit code in error", () => {
expect(error.toString()).toMatch(/(Operation failed).*(1)/);
});
});
});