Skip to content

Commit

Permalink
Refactor test assertion to be platform agnostic.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 16, 2019
1 parent ee4680d commit 1fd1066
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/ember-template-recast-test.js
Expand Up @@ -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'
Expand Down

0 comments on commit 1fd1066

Please sign in to comment.