From a0d2caf0037433232ce5c1783ed0857db3b5b0e9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 22 Sep 2021 22:01:25 +0200 Subject: [PATCH] test: early return if build failed --- test/presets/_tests.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/presets/_tests.mjs b/test/presets/_tests.mjs index 6c86e32383..c02782deea 100644 --- a/test/presets/_tests.mjs +++ b/test/presets/_tests.mjs @@ -1,5 +1,5 @@ -import { resolve } from 'path' import { pathToFileURL } from 'url' +import { resolve } from 'path' import destr from 'destr' import { listen } from 'listhen' import { $fetch } from 'ohmyfetch' @@ -24,7 +24,8 @@ export function setupTest (preset) { fetch: url => $fetch(url, { baseURL: ctx.server.url }) } - it('nitro build', async () => { + before('nitro build', async function () { + this.timeout(60000) const nuxtCLI = isBridge ? resolve(ctx.rootDir, 'node_modules/nuxt/bin/nuxt.js') : resolveWorkspace('packages/nuxi/bin/nuxi.cjs') @@ -37,7 +38,7 @@ export function setupTest (preset) { NODE_ENV: 'production' } }) - }).timeout(60000) + }) after('Cleanup', async () => { if (ctx.server) { @@ -52,7 +53,7 @@ export async function startServer (ctx, handle) { ctx.server = await listen(handle) } -export function testNitroBehavior (ctx, getHandler) { +export function testNitroBehavior (_ctx, getHandler) { let handler it('setup handler', async () => {