Skip to content

Commit

Permalink
Add Windows and macOS CI testing. (#143)
Browse files Browse the repository at this point in the history
Add Windows and macOS CI testing.
  • Loading branch information
rwjblue committed Oct 16, 2019
2 parents 73c6cc2 + d845e13 commit 88a2625
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -30,11 +30,12 @@ jobs:

test:
name: Tests
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: ['^8.12', '10', '12']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v1
Expand Down
12 changes: 8 additions & 4 deletions tests/ember-template-recast-test.js
Expand Up @@ -2,6 +2,7 @@ const execa = require('execa');
const { readFileSync } = require('fs');
const { join } = require('path');
const { createTempDir } = require('broccoli-test-helper');
const slash = require('slash');

function run(args, cwd) {
return execa(require.resolve('../bin/ember-template-recast'), args, { cwd });
Expand Down Expand Up @@ -104,10 +105,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 = slash(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 88a2625

Please sign in to comment.