Skip to content

Commit

Permalink
test: remove satisfies which breaks if token is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelstroschein committed Dec 25, 2024
1 parent 936b6bc commit 07007e2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { expect, test, vi } from "vitest";
import { capture } from "./capture.js";
import type { ENV_VARIABLES } from "../env-variables/index.js";

test("it should not capture if telemetry is off", async () => {
// @ts-expect-error - global.fetch is not defined
Expand All @@ -10,7 +9,7 @@ test("it should not capture if telemetry is off", async () => {
return {
ENV_VARIABLES: {
PARJS_POSTHOG_TOKEN: "mock-defined",
} satisfies Partial<typeof ENV_VARIABLES>,
},
};
});

Expand All @@ -33,7 +32,7 @@ test("it should not capture if telemetry is NOT off", async () => {
return {
ENV_VARIABLES: {
PARJS_POSTHOG_TOKEN: "mock-defined",
} satisfies Partial<typeof ENV_VARIABLES>,
},
};
});

Expand Down

0 comments on commit 07007e2

Please sign in to comment.