Skip to content

Commit 0a35394

Browse files
committed
test: run build before e2e test
1 parent ee1cc5b commit 0a35394

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ for (const projectName of fs.readdirSync(playgroundDir)) {
1919
throw new Error(`Unit tests failed in ${projectName}`)
2020
}
2121

22+
console.log(`Building ${projectName}`)
23+
const buildResult = spawnSync('pnpm', ['build'], {
24+
cwd: path.resolve(playgroundDir, projectName),
25+
stdio: 'inherit',
26+
shell: true
27+
})
28+
if (buildResult.status !== 0) {
29+
throw new Error(`Build failed in ${projectName}`)
30+
}
31+
2232
console.log(`Running e2e tests in ${projectName}`)
2333
const e2eTestResult = spawnSync('pnpm', ['test:e2e:ci'], {
2434
cwd: path.resolve(playgroundDir, projectName),

0 commit comments

Comments
 (0)