feat: Use status directly from executions
This commit is contained in:
@@ -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(),
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user