test: Add multiple executions explicitly for last internal id test

This commit is contained in:
Faruk AYDIN
2024-10-30 14:27:28 +01:00
parent 892710f705
commit d38b0f088b

View File

@@ -124,9 +124,12 @@ describe('Flow model', () => {
describe('lastInternalId', () => { describe('lastInternalId', () => {
it('should return internal ID of last execution when exists', async () => { it('should return internal ID of last execution when exists', async () => {
const flow = await createFlow(); const flow = await createFlow();
const execution = await createExecution({ flowId: flow.id });
expect(await flow.lastInternalId()).toBe(execution.internalId); await createExecution({ flowId: flow.id });
await createExecution({ flowId: flow.id });
const lastExecution = await createExecution({ flowId: flow.id });
expect(await flow.lastInternalId()).toBe(lastExecution.internalId);
}); });
it('should return null when no flow execution exists', async () => { it('should return null when no flow execution exists', async () => {