Skip to content

Commit b910788

Browse files
committed
test: update test assertions
1 parent 7a798ab commit b910788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ describe("API", () => {
160160

161161
// Behaviour
162162
await expect(dispatchWorkflow("")).rejects.toThrow(
163-
`Failed to dispatch action, expected 204 but received ${errorStatus}`,
163+
`Failed to dispatch action, expected 200 or 204 but received ${errorStatus}`,
164164
);
165165

166166
// Logging
167167
assertOnlyCalled(coreErrorLogMock, coreDebugLogMock);
168168
expect(coreErrorLogMock).toHaveBeenCalledOnce();
169169
expect(coreErrorLogMock.mock.calls[0]?.[0]).toMatchInlineSnapshot(
170-
`"dispatchWorkflow: An unexpected error has occurred: Failed to dispatch action, expected 204 but received 401"`,
170+
`"dispatchWorkflow: An unexpected error has occurred: Failed to dispatch action, expected 200 or 204 but received 401"`,
171171
);
172172
expect(coreDebugLogMock).toHaveBeenCalledOnce();
173173
});

0 commit comments

Comments
 (0)