forked from sourcegraph/cody
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests on windows (sourcegraph#6348)
## Test plan 1. Run the following command: `pnpm run test` a) in the root cody workspace dir b) in the agent dir 1. Run the following command: `pnpm run test:unit` a) in the root cody workspace dir b) in the agent dir In every case before running tests it should rebuild an agent dir. ## Changelog Fixes errors like this: https://github.com/sourcegraph/cody/actions/runs/12316198852/job/34378863340
- Loading branch information
Showing
4 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vitest/config' | ||
|
||
export default defineConfig({ | ||
test: { | ||
globalSetup: ['./vitest.setup.ts'], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { execSync } from 'node:child_process' | ||
import path from 'node:path' | ||
|
||
function buildAgentForTests() { | ||
execSync('pnpm run build:for-tests', { | ||
cwd: path.join(__dirname, 'agent'), | ||
stdio: 'inherit', | ||
}) | ||
} | ||
|
||
export default function setup() { | ||
buildAgentForTests() | ||
} |