test: Add createdAt and updatedAt defaultst to execution and flow

This commit is contained in:
Faruk AYDIN
2023-10-26 17:16:42 +02:00
parent 6567d24760
commit 945c52dd6b
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ import { createFlow } from './flow';
export const createExecution = async (params: Partial<Execution> = {}) => {
params.flowId = params?.flowId || (await createFlow()).id;
params.testRun = params?.testRun || false;
params.createdAt = params?.createdAt || new Date().toISOString();
params.updatedAt = params?.updatedAt || new Date().toISOString();
const [execution] = await global.knex
.table('executions')