Skip to content

Commit f16fca8

Browse files
committed
Skip workflow test on older node versions
1 parent 0d27a04 commit f16fca8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/cloudflare/test/workflow.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import type { WorkflowEvent, WorkflowStep, WorkflowStepConfig } from 'cloudflare
33
import { beforeEach, describe, expect, test, vi } from 'vitest';
44
import { instrumentWorkflowWithSentry } from '../src/workflows';
55

6+
const NODE_MAJOR_VERSION = parseInt(process.versions.node.split('.')[0]!);
7+
8+
if (NODE_MAJOR_VERSION < 20) {
9+
process.exit(0); // Skip tests for Node.js versions below 20
10+
}
11+
612
const mockStep: WorkflowStep = {
713
do: vi
814
.fn()

0 commit comments

Comments
 (0)