diff --git a/plugins/async-node/core/src/index.test.ts b/plugins/async-node/core/src/index.test.ts index f9bb91c3d..ec47f18f3 100644 --- a/plugins/async-node/core/src/index.test.ts +++ b/plugins/async-node/core/src/index.test.ts @@ -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(() => { @@ -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); @@ -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 () => {