app-launch-gate.test.ts 399 B

123456789101112
  1. import { describe, expect, it } from "vitest";
  2. describe("app launch gate", () => {
  3. it("allows app launch telemetry exactly once", async () => {
  4. const { createAppLaunchGate } = await import("../src/main/appLaunchGate.js");
  5. const gate = createAppLaunchGate();
  6. expect(gate.consume()).toBe(true);
  7. expect(gate.consume()).toBe(false);
  8. expect(gate.consume()).toBe(false);
  9. });
  10. });