_smoke.test.ts

995 B · raw

1// @vitest-environment jsdom2//3// Smoke test: proves the heavy content-script modules import cleanly under the4// shared chrome mock. If this fails, every index.ts/inject.ts-dependent test5// below it is unrunnable — so it gates the whole suite.67import "./_setup";8import { describe, expect, it } from "vitest";910describe("AUTOFILL-TESTS harness smoke", () => {11  it("imports index.ts seams without throwing", async () => {12    const mod = await import("./index");13    expect(typeof mod.handleFieldInteraction).toBe("function");14    expect(typeof mod.initialScan).toBe("function");15    expect(typeof mod.wasAlreadyFilled).toBe("function");16    expect(mod._testSeam).toBeTruthy();17    expect(typeof mod._testSeam.DISMISS_LOCK_MS).toBe("number");18  });1920  it("imports inject.ts UI exports without throwing", async () => {21    const mod = await import("./inject");22    expect(typeof mod.showAutofillSelector).toBe("function");23    expect(typeof mod.injectFieldIcon).toBe("function");24  });25});