feat: Use status directly from executions

This commit is contained in:
Faruk AYDIN
2025-03-19 17:09:36 +01:00
parent fcc1c5067e
commit 9a0aef9d9b
7 changed files with 12 additions and 23 deletions

View File

@@ -4,6 +4,7 @@ const executionSerializer = (execution) => {
let executionData = {
id: execution.id,
testRun: execution.testRun,
status: execution.status,
createdAt: execution.createdAt.getTime(),
updatedAt: execution.updatedAt.getTime(),
};

View File

@@ -19,6 +19,7 @@ describe('executionSerializer', () => {
const expectedPayload = {
id: execution.id,
testRun: execution.testRun,
status: execution.status,
createdAt: execution.createdAt.getTime(),
updatedAt: execution.updatedAt.getTime(),
};
@@ -26,20 +27,6 @@ describe('executionSerializer', () => {
expect(executionSerializer(execution)).toStrictEqual(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)).toStrictEqual(expectedPayload);
});
it('should return the execution data with the flow', async () => {
execution.flow = flow;