Skip to content

Commit 2424315

Browse files
authored
Remove sleep() overloads e2e tests (#235)
The overloads parsing logic is now covered in unit tests, so we only need one e2e test for the specific sleep functionality. Signed-off-by: Nathan Rajlich <n@n8.io>
1 parent 809e0fe commit 2424315

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

.changeset/nasty-olives-jam.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/core/e2e/e2e.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,6 @@ describe('e2e', () => {
299299
expect(returnValue.endTime - returnValue.startTime).toBeGreaterThan(9999);
300300
});
301301

302-
test('sleepingDateWorkflow', { timeout: 60_000 }, async () => {
303-
const endDate = new Date(Date.now() + 30_000);
304-
const run = await triggerWorkflow('sleepingDateWorkflow', [endDate]);
305-
const returnValue = await getWorkflowReturnValue(run.runId);
306-
expect(returnValue.startTime).toBeLessThan(returnValue.endTime);
307-
expect(returnValue.endTime).toBeGreaterThanOrEqual(endDate.getTime());
308-
});
309-
310302
test('nullByteWorkflow', { timeout: 60_000 }, async () => {
311303
const run = await triggerWorkflow('nullByteWorkflow', []);
312304
const returnValue = await getWorkflowReturnValue(run.runId);

workbench/example/workflows/99_e2e.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -197,22 +197,6 @@ export async function sleepingWorkflow() {
197197
return { startTime, endTime };
198198
}
199199

200-
export async function sleepingDateWorkflow(endDate: Date) {
201-
'use workflow';
202-
const startTime = Date.now();
203-
await sleep(endDate);
204-
const endTime = Date.now();
205-
return { startTime, endTime };
206-
}
207-
208-
export async function sleepingDurationMsWorkflow() {
209-
'use workflow';
210-
const startTime = Date.now();
211-
await sleep(10000);
212-
const endTime = Date.now();
213-
return { startTime, endTime };
214-
}
215-
216200
//////////////////////////////////////////////////////////
217201

218202
async function nullByteStep() {

0 commit comments

Comments
 (0)