feat: Extend execution serializer with status

This commit is contained in:
Faruk AYDIN
2024-03-06 14:46:10 +01:00
parent f4d8d909b0
commit 25e231cd7c
2 changed files with 18 additions and 0 deletions

View File

@@ -26,6 +26,20 @@ describe('executionSerializer', () => {
expect(executionSerializer(execution)).toEqual(expectedPayload);
});
it('should return the execution data with status', async () => {
execution.status = 'success';
const expectedPayload = {
id: execution.id,
testRun: execution.testRun,
createdAt: execution.createdAt.getTime(),
updatedAt: execution.updatedAt.getTime(),
status: 'success',
};
expect(executionSerializer(execution)).toEqual(expectedPayload);
});
it('should return the execution data with the flow', async () => {
execution.flow = flow;