From 38cda68fb8b3764851994061e0c0ce2d268e3120 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 23 Nov 2019 16:30:05 +0100 Subject: [PATCH 1/2] CI: Run main test suite on Windows too --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From 5ba4a4a5cb6aea3f4011b20689307cb6cb3cd7b6 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sat, 23 Nov 2019 16:38:35 +0100 Subject: [PATCH 2/2] tests: Adjust expectations with OS-specific line endings --- node-tests/strip-data-test-properties-plugin-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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],