Skip to content

Commit

Permalink
debug: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
galvez committed Oct 13, 2024
1 parent 2704531 commit 671fc32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/test-factories.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ export function makeIndexTest ({ main, dev }) {
export function makeSSRBuildTest ({ cwd }) {
return async () => {
await build({
root: cwd,
build: {
outDir: 'dist/client',
ssrManifest: true,
}
})
await build({
root: cwd,
build: {
outDir: 'dist/server',
ssr: './index.js',
Expand All @@ -30,7 +32,7 @@ export function makeSSRBuildTest ({ cwd }) {
}
}

export function makeSPABuildTest ({ cwd }) {
export function makeSPABuildTest () {
return async () => {
await build({
build: {
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-hydration/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { main } from './server.js'
const cwd = dirname(fileURLToPath(import.meta.url))

test('vue-hydration', async (t) => {
await t.test('render index page in development', makeIndexTest({ main, dev: true }))
await t.test('build production bundle', makeSSRBuildTest({ cwd }))
await t.test('render index page in development', makeIndexTest({ main, dev: true }))
await t.test('render index page in production', makeIndexTest({ main }))
})

0 comments on commit 671fc32

Please sign in to comment.