File size: 488 Bytes
3206347 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import flowSerializer from './flow.js';
const executionSerializer = (execution) => {
let executionData = {
id: execution.id,
testRun: execution.testRun,
createdAt: execution.createdAt.getTime(),
updatedAt: execution.updatedAt.getTime(),
};
if (execution.status) {
executionData.status = execution.status;
}
if (execution.flow) {
executionData.flow = flowSerializer(execution.flow);
}
return executionData;
};
export default executionSerializer;
|