Skip to content

Commit

Permalink
Fix step tool testing assuming default blank name
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Sep 25, 2023
1 parent 0dc3f95 commit 019e263
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/inngest/src/components/InngestStepTools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ describe("waitForEvent", () => {
});
});

test("returns no name by default", () => {
test("returns ID by default", () => {
void waitForEvent("id", { event: "event", timeout: "2h" });
expect(getOp()).toMatchObject({
displayName: undefined,
displayName: "id",
});
});

Expand Down Expand Up @@ -190,10 +190,10 @@ describe("run", () => {
});
});

test("return no name by default", () => {
test("return ID by default", () => {
void run("id", () => undefined);
expect(getOp()).toMatchObject({
displayName: undefined,
displayName: "id",
});
});

Expand Down Expand Up @@ -273,10 +273,10 @@ describe("sleep", () => {
});
});

test("return no name by default", () => {
test("return ID by default", () => {
void sleep("id", "1m");
expect(getOp()).toMatchObject({
displayName: undefined,
displayName: "id",
});
});

Expand Down Expand Up @@ -309,13 +309,13 @@ describe("sleepUntil", () => {
});
});

test("return no name by default", () => {
test("return ID by default", () => {
const future = new Date();
future.setDate(future.getDate() + 1);

void sleepUntil("id", future);
expect(getOp()).toMatchObject({
displayName: undefined,
displayName: "id",
});
});

Expand Down Expand Up @@ -431,10 +431,10 @@ describe("sendEvent", () => {
expect(getOp()).toMatchObject({ op: StepOpCode.StepPlanned });
});

test("return no name by default", () => {
test("return ID by default", () => {
void sendEvent("id", { name: "step", data: "foo" });

expect(getOp()).toMatchObject({ displayName: undefined });
expect(getOp()).toMatchObject({ displayName: "id" });
});

test("return specific name if given", () => {
Expand Down

0 comments on commit 019e263

Please sign in to comment.