You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten cleanup in `dev.test.ts``should include steps discovered from workflow imports` so the deferred builder drops the discovered step from the manifest before the next test file runs. Avoids a Windows-only race where the generated step route retains an import to a deleted source file and breaks every subsequent step request.
Copy file name to clipboardExpand all lines: docs/content/docs/api-reference/vitest/index.mdx
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,30 @@ export default defineConfig({
22
22
});
23
23
```
24
24
25
+
Pass a [`WorkflowTestOptions`](#workflowtestoptions) object when your project uses a non-standard layout — for example, a monorepo where `workflows/` does not live at the Vitest config's directory, or when the default `.workflow-data` / `.workflow-vitest` output locations need to move. The plugin forwards these paths to `buildWorkflowTests()` and `setupWorkflowTests()` through Vitest's per-project provided context, so each Vitest workspace project stays isolated.
26
+
27
+
{/* @skip-typecheck - @workflow/vitest not available in docs-typecheck */}
@@ -83,7 +107,10 @@ Tears down the workflow test world. Clears the global world and closes the Local
83
107
84
108
| Option | Type | Default | Description |
85
109
| --- | --- | --- | --- |
86
-
|`cwd`|`string`|`process.cwd()`| The working directory of the project (where `workflows/` lives) |
110
+
|`cwd`|`string`|`process.cwd()`| The working directory of the project (where `workflows/` lives). Relative paths resolve against `process.cwd()`. |
111
+
|`rootDir`|`string`| same as `cwd`| Root directory used for default test artifacts. When set, `dataDir` and `outDir` default to `<rootDir>/.workflow-data` and `<rootDir>/.workflow-vitest`. Relative paths resolve against `cwd`. |
112
+
|`dataDir`|`string`|`<rootDir>/.workflow-data`| Directory for workflow runtime data written by the test world. Relative paths resolve against `cwd`. |
113
+
|`outDir`|`string`|`<rootDir>/.workflow-vitest`| Directory for generated workflow and step bundles. Relative paths resolve against `cwd`. |
0 commit comments