Skip to content

Commit

Permalink
updated test case as per the ask (but test case fails)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuntala-motukuri committed Jul 11, 2024
1 parent bed39af commit 3319bbe
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions plugins/async-node/core/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,13 @@ test("should handle the promise using .then", async () => {
});

if (deferredResolve) {
deferredResolve([
{
asset: {
id: "value-1",
type: "text",
value: "1st value in the multinode",
},
},
{
id: "another-async",
async: true,
deferredResolve({
asset: {
id: "next-label-action",
type: "action",
value: "dummy value",
},
]);
});
}

await waitFor(() => {
Expand All @@ -175,7 +169,7 @@ test("should handle the promise using .then", async () => {
?.lastUpdate;

expect(view?.actions[0].asset.type).toBe("action");
expect(view?.actions[1].asset.type).toBe("text");
expect(view?.actions[1].asset.type).toBe("action");
expect(view?.actions[2]).toBeUndefined();
expect(updateNumber).toBe(2);

Expand All @@ -191,7 +185,7 @@ test("should handle the promise using .then", async () => {
?.lastUpdate;

expect(view?.actions[0].asset.type).toBe("action");
expect(view?.actions.length).toBe(2);
expect(view?.actions[1]).toBeUndefined();
});

test("replaces async nodes with provided node", async () => {
Expand Down

0 comments on commit 3319bbe

Please sign in to comment.