diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b41037df..d3ced766 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] node-version: [8.x, 10.x, 12.x] steps: diff --git a/node-tests/strip-data-test-properties-plugin-test.js b/node-tests/strip-data-test-properties-plugin-test.js index 8b12209e..26cb2403 100644 --- a/node-tests/strip-data-test-properties-plugin-test.js +++ b/node-tests/strip-data-test-properties-plugin-test.js @@ -14,7 +14,7 @@ function testFixture(name) { let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`; let expectedPath = `${__dirname}/fixtures/${name}/expected.js`; - let expected = fs.readFileSync(expectedPath).toString(); + let expected = fs.readFileSync(expectedPath, 'utf8').replace(/\r\n/g, '\n'); let result = babel5.transformFileSync(fixturePath, { plugins: [StripDataTestPropertiesPlugin5], }); @@ -26,7 +26,7 @@ function testFixture(name) { let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`; let expectedPath = `${__dirname}/fixtures/${name}/expected6.js`; - let expected = fs.readFileSync(expectedPath).toString(); + let expected = fs.readFileSync(expectedPath, 'utf8').replace(/\r\n/g, '\n'); let result = babel6.transformFileSync(fixturePath, { plugins: [StripDataTestPropertiesPlugin6], @@ -39,7 +39,7 @@ function testFixture(name) { let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`; let expectedPath = `${__dirname}/fixtures/${name}/expected7.js`; - let expected = fs.readFileSync(expectedPath).toString(); + let expected = fs.readFileSync(expectedPath, 'utf8').replace(/\r\n/g, '\n'); let result = babel7.transformFileSync(fixturePath, { plugins: [StripDataTestPropertiesPlugin6],