mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 11:01:44 +00:00
It appears that the workspace configuration is somehow broken because it
doesn't include any tests defined in `client/web/src/`. This can be
tested by filtering for a test inside this subtree, for example
pnpm exec vitest RepoRevisionSidebar
vitest will error saying it didn't find any tests. The list of projects
it prints also doesn't include `web`.
I don't know what exactly it is that makes it exclude `client/web/` but
with the simpler version in this PR `client/web/` will be included.
I removed `client/web/dev/` from the list because it will be included by
`client/web/` too and seems to "just work" even though it has it's own
configuration file.
17 lines
440 B
TypeScript
17 lines
440 B
TypeScript
import { readFileSync } from 'fs'
|
|
import path from 'path'
|
|
|
|
import { load } from 'js-yaml'
|
|
|
|
interface PnpmWorkspaceFile {
|
|
packages: string[]
|
|
}
|
|
|
|
function fromPnpmWorkspaceFile(filePath: string): string[] {
|
|
return (load(readFileSync(filePath, 'utf8')) as PnpmWorkspaceFile).packages.map(p => `${p}/vitest.config.ts`, {
|
|
cwd: __dirname,
|
|
})
|
|
}
|
|
|
|
export default fromPnpmWorkspaceFile(path.join(__dirname, 'pnpm-workspace.yaml'))
|