Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit b26e034

Browse files
vitbokischclaude
andcommitted
Fix integration tests for CI: inline config, no external imports
Use configFile: false with inline zeroPlugin() instead of loading vite.config.ts, which fails in CI because @pyreon/zero's lib/ isn't built. Remove fixture entry files (not needed by the tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1fddc80 commit b26e034

4 files changed

Lines changed: 4 additions & 17 deletions

File tree

packages/zero/src/tests/integration/fixture/src/entry-client.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/zero/src/tests/integration/fixture/src/entry-server.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/zero/src/tests/integration/fixture/vite.config.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/zero/src/tests/integration/ssr.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { resolve } from 'node:path'
22
import { createServer, type ViteDevServer } from 'vite'
33
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
4+
import { zeroPlugin } from '../../vite-plugin'
45

56
const FIXTURE_DIR = resolve(import.meta.dirname, 'fixture')
67

@@ -10,7 +11,9 @@ let baseUrl: string
1011
beforeAll(async () => {
1112
server = await createServer({
1213
root: FIXTURE_DIR,
13-
server: { port: 0 }, // random available port
14+
configFile: false, // Don't load vite.config.ts — configure inline
15+
plugins: [zeroPlugin({ mode: 'ssr' })],
16+
server: { port: 0 },
1417
logLevel: 'silent',
1518
})
1619
await server.listen()
@@ -54,7 +57,6 @@ describe('SSR integration', () => {
5457
const mod = await server.ssrLoadModule('virtual:zero/routes')
5558
const route = mod.routes.find((r: { path: string }) => r.path === '/')
5659
expect(route).toBeDefined()
57-
// renderMode should be in meta (wired by generateRouteModule)
5860
expect(route.meta).toBeDefined()
5961
})
6062

@@ -80,7 +82,6 @@ describe('SSR integration', () => {
8082
})
8183

8284
it('loads virtual modules via plugin resolveId', async () => {
83-
// Test that the zero plugin resolves virtual module IDs
8485
const resolved = await server.pluginContainer.resolveId(
8586
'virtual:zero/routes',
8687
)

0 commit comments

Comments
 (0)