From: Haoqun Jiang Date: Thu, 18 Nov 2021 08:38:16 +0000 (+0800) Subject: test: run build before e2e test X-Git-Tag: v3.0.0-beta.7~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a353948bc5bc137e6147e3aa83738b69d453265;p=thirdparty%2Fvuejs%2Fcreate-vue.git test: run build before e2e test --- diff --git a/test.js b/test.js index 51fe1561..c80ebd39 100644 --- a/test.js +++ b/test.js @@ -19,6 +19,16 @@ for (const projectName of fs.readdirSync(playgroundDir)) { throw new Error(`Unit tests failed in ${projectName}`) } + console.log(`Building ${projectName}`) + const buildResult = spawnSync('pnpm', ['build'], { + cwd: path.resolve(playgroundDir, projectName), + stdio: 'inherit', + shell: true + }) + if (buildResult.status !== 0) { + throw new Error(`Build failed in ${projectName}`) + } + console.log(`Running e2e tests in ${projectName}`) const e2eTestResult = spawnSync('pnpm', ['test:e2e:ci'], { cwd: path.resolve(playgroundDir, projectName),