diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..5be55d90 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: [push, pull_request] +jobs: + Tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [ '8', '10', '12', '14' ] + os: [ubuntu-latest, windows-latest] + name: Test on Node v${{ matrix.node-version }} on ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run all + env: + CI: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5cc64626..00000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: -- '8' -- '10' -- '12' -- '14' - -script: -- npm run all \ No newline at end of file diff --git a/test/loader.spec.js b/test/loader.spec.js index 3195712c..e5366a9d 100644 --- a/test/loader.spec.js +++ b/test/loader.spec.js @@ -9,7 +9,7 @@ chai.use(sinonChai); const { expect } = chai; function d([str]) { - return str.replace(/^\t+/gm, '').trim(); + return str.replace(/^\t+/gm, '').replace(/\r/g, '').trim(); } describe('loader', () => { @@ -88,7 +88,7 @@ describe('loader', () => { ) { expect(err).to.exist; - expect(err.message.trim()).to.eql(d` + expect(err.message.trim().replace(/\r/g, '')).to.eql(d` ValidationError: A component cannot have a default export (2:1) 1: