Skip to content

Commit

Permalink
Try using only @local
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Dec 11, 2024
1 parent d265244 commit ec58bbd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/inngest/src/components/execution/als.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InngestTestEngine } from "@inngest/test";
import { type AsyncContext } from "./als";
import { type AsyncContext } from "@local/components/execution/als";

describe("getAsyncLocalStorage", () => {
const warningSpy = jest.spyOn(console, "warn");
Expand All @@ -10,7 +10,7 @@ describe("getAsyncLocalStorage", () => {
});

test("should return an `AsyncLocalStorageIsh`", async () => {
const mod = await import("./als");
const mod = await import("@local/components/execution/als");
const als = await mod.getAsyncLocalStorage();

expect(als).toBeDefined();
Expand All @@ -19,7 +19,7 @@ describe("getAsyncLocalStorage", () => {
});

test("should return the same instance of `AsyncLocalStorageIsh`", async () => {
const mod = await import("./als");
const mod = await import("@local/components/execution/als");

const als1p = mod.getAsyncLocalStorage();
const als2p = mod.getAsyncLocalStorage();
Expand All @@ -35,7 +35,7 @@ describe("getAsyncLocalStorage", () => {
throw new Error("import failed");
});

const mod = await import("./als");
const mod = await import("@local/components/execution/als");
const als = await mod.getAsyncLocalStorage();

expect(warningSpy).toHaveBeenCalledWith(
Expand All @@ -62,7 +62,7 @@ describe("getAsyncCtx", () => {
});

test("should return `undefined` outside of an Inngest async context", async () => {
const mod = await import("./als");
const mod = await import("@local/components/execution/als");
const store = await mod.getAsyncCtx();

expect(store).toBeUndefined();
Expand Down

0 comments on commit ec58bbd

Please sign in to comment.