Spaces:
Paused
Paused
File size: 467 Bytes
fb4d8fe | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import { describe, expect, it } from "vitest";
import { isAddressInUseError } from "./gmail-watcher.js";
describe("gmail watcher", () => {
it("detects address already in use errors", () => {
expect(isAddressInUseError("listen tcp 127.0.0.1:8788: bind: address already in use")).toBe(
true,
);
expect(isAddressInUseError("EADDRINUSE: address already in use")).toBe(true);
expect(isAddressInUseError("some other error")).toBe(false);
});
});
|