1
0

errors.spec.ts 527 B

12345678910111213
  1. import { describe, expect, it } from "vitest";
  2. import { ChecksumMismatchError, MigrationError, PlatformError } from "./errors.js";
  3. describe("errors", () => {
  4. it("Has a \"date\" property", () => {
  5. expect(new ChecksumMismatchError("").name).toBe("ChecksumMismatchError");
  6. expect(new MigrationError("").name).toBe("MigrationError");
  7. expect(new PlatformError("").name).toBe("PlatformError");
  8. expect(new PlatformError("").message).toBe("");
  9. expect(new PlatformError("").date).toBeInstanceOf(Date);
  10. });
  11. });