From 1fd1066731fdfd95711b9a3a7414afdb3cb10563 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 16 Oct 2019 13:59:00 -0400 Subject: [PATCH] Refactor test assertion to be platform agnostic. --- tests/ember-template-recast-test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/ember-template-recast-test.js b/tests/ember-template-recast-test.js index 0691c97e..75cd6faa 100644 --- a/tests/ember-template-recast-test.js +++ b/tests/ember-template-recast-test.js @@ -104,10 +104,13 @@ Errored: 1` 'Status message includes error count' ); - assert.ok( - stdout.includes(join(this.fixture.path(), 'files/bad-template.hbs')), - 'Output includes full path to bad template' - ); + let badFilePath = join(this.fixture.path(), 'files/bad-template.hbs'); + + assert.pushResult({ + result: stdout.includes(badFilePath), + message: `Expected output to include full path to the invalid template (${badFilePath}): \n\n${stdout}`, + }); + assert.ok( stdout.includes('Error: Parse error on line 1:'), 'Output includes error stacktrace'