Skip to content

Commit bb012a8

Browse files
committed
build(vitest): relocate isolated config to .config/repo/
The isolated vitest config was a migration straggler still at .config/, while the main config already lives at .config/repo/vitest.config.mts. Move it to match. Fix the __dirname-relative paths broken by descending one directory: vitest.coverage.config.mts import, projectRoot (now two levels up), and the global-setup path. Repoint the CI runner and the cross-reference comment in vitest.config.mts.
1 parent 7bc9dda commit bb012a8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { fileURLToPath } from 'node:url'
88
import process from 'node:process'
99
import { defineConfig } from 'vitest/config'
1010

11-
import { baseCoverageConfig } from './vitest.coverage.config.mts'
11+
import { baseCoverageConfig } from '../vitest.coverage.config.mts'
1212

1313
const __dirname = path.dirname(fileURLToPath(import.meta.url))
14-
const projectRoot = path.resolve(__dirname, '..')
14+
const projectRoot = path.resolve(__dirname, '..', '..')
1515

1616
// Worker heap cap: smaller in CI (GitHub Actions ubuntu-latest has
1717
// ~7 GB total RAM — leave room for the runner + OS), generous locally
@@ -43,7 +43,7 @@ const vitestConfigIsolated = defineConfig({
4343
},
4444
test: {
4545
deps: { interopDefault: false },
46-
globalSetup: [path.resolve(__dirname, 'vitest-global-setup.mts')],
46+
globalSetup: [path.resolve(__dirname, '..', 'vitest-global-setup.mts')],
4747
globals: false,
4848
environment: 'node',
4949
include: [

.config/repo/vitest.config.mts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
run: pnpm run build
3737

3838
- name: Run isolated tests
39-
run: pnpm exec vitest --config .config/vitest.config.isolated.mts run
39+
run: pnpm exec vitest --config .config/repo/vitest.config.isolated.mts run

0 commit comments

Comments
 (0)