Skip to content

Commit 4ead961

Browse files
authored
fix(trigger): exclude integration test files from task discovery (#8307)
* fix(trigger): exclude integration test files from task discovery * fix(trigger): cover tsx and jsx test files in task discovery ignores
1 parent 0bde1e4 commit 4ead961

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎apps/sim/trigger.config.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ export default defineConfig({
9696
},
9797
},
9898
dirs: ['./background'],
99+
/**
100+
* Every file under `dirs` is imported as a task file at deploy time, so any
101+
* test co-located there must be excluded or its top-level `vi.mock()` throws
102+
* outside Vitest and fails the whole deploy. Setting this replaces the CLI's
103+
* defaults (`*.test.*` and `*.spec.*`), which are restated here alongside
104+
* the `*.integration.*` suffix used for suites that run against real
105+
* Postgres/Redis, across every extension task discovery matches.
106+
*/
107+
ignorePatterns: ['**/*.{test,spec,integration}.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'],
99108
/**
100109
* Runs before any task run, in the run process. Marks the process so that
101110
* dispatch decisions further down the call graph stop inferring from

0 commit comments

Comments
 (0)