From 63424dc3ef58750024e54eb0627199b910305f77 Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Thu, 13 Apr 2017 11:32:29 +0200 Subject: [PATCH] Fix tests with Ava new version --- test/error.test.js | 7 ++----- test/utils.test.js | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/error.test.js b/test/error.test.js index 8ae6e025a..4b6ebad14 100644 --- a/test/error.test.js +++ b/test/error.test.js @@ -28,11 +28,8 @@ test('/ should display an error', async t => { }) test('/404 should display an error too', async t => { - try { - await nuxt.renderRoute('/404') - } catch (e) { - t.true(e.message.includes('not_defined is not defined')) - } + let { error } = await nuxt.renderRoute('/404') + t.true(error.message.includes('This page could not be found.')) }) test('/ with renderAndGetWindow()', async t => { diff --git a/test/utils.test.js b/test/utils.test.js index b466a5403..3e09d1af1 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -25,6 +25,7 @@ test('getContext', t => { test('setAnsiColors', t => { utils.setAnsiColors(ansiHTML) + t.pass() }) test('waitFor', function * (t) {