From d0d8865c89aa5727ce7654be6d5dd73bb2f033fe Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 27 Sep 2020 21:02:36 -0400 Subject: [PATCH] chore: Skip constructor tests on v14.6+ Related to tracking issue https://github.com/sass/node-sass/issues/2972 --- .github/workflows/alpine.yml | 4 +-- .github/workflows/linux.yml | 4 +-- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- appveyor.yml | 4 +-- test/types.js | 65 +++++++++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 8 deletions(-) diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index 35893191e..7700babe8 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -15,13 +15,13 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 include: - node: 10 alpine: "3.9" - node: 12 alpine: "3.9" - - node: 14.5 + - node: 14 alpine: "3.10" steps: - name: Install Alpine build tools diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f18bcc5a6..9e3184c3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 include: - node: 10 gcc: "gcc-4.9" @@ -22,7 +22,7 @@ jobs: gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 - - node: 14.5 + - node: 14 gcc: "gcc-6" gpp: "g++-6" os: ubuntu-18.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 88b20175d..bdfeb0088 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 26fad7b2c..9724b096c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,7 +12,7 @@ jobs: node: - 10 - 12 - - 14.5 + - 14 steps: - uses: actions/checkout@v2 diff --git a/appveyor.yml b/appveyor.yml index d362e3f0a..c83e68fbb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,7 +39,7 @@ - nodejs_version: 12 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14.5 + - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 @@ -115,7 +115,7 @@ - nodejs_version: 12 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - nodejs_version: 14.5 + - nodejs_version: 14 GYP_MSVS_VERSION: 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 diff --git a/test/types.js b/test/types.js index da42b5707..4593b5356 100644 --- a/test/types.js +++ b/test/types.js @@ -3,6 +3,7 @@ var assert = require('assert').strict; var sass = require('../'); +var semver = require('semver'); describe('sass.types', function() { describe('Boolean', function() { @@ -15,6 +16,10 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } var t = sass.types.Boolean(true); assert.strictEqual(t.toString(), '[object SassBoolean]'); @@ -89,11 +94,21 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var t = sass.types.Color(); assert.strictEqual(t.toString(), '[object SassColor]'); }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var t = new sass.types.Color(1); assert.strictEqual(t.toString(), '[object SassColor]'); }); @@ -235,6 +250,11 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var e = sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); assert.strictEqual(e.toString(), '[object SassError]'); @@ -243,6 +263,11 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var e = new sass.types.Error('Such Error'); assert.ok(e instanceof sass.types.Error); assert.strictEqual(e.toString(), '[object SassError]'); @@ -260,12 +285,22 @@ describe('sass.types', function() { }); it('support call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var list = sass.types.List(); assert.ok(list instanceof sass.types.List); assert.strictEqual(list.toString(), '[object SassList]'); }); it('support new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var list = new sass.types.List(); assert.ok(list instanceof sass.types.List); assert.strictEqual(list.toString(), '[object SassList]'); @@ -411,11 +446,21 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = sass.types.Map(); assert.strictEqual(x.toString(), '[object SassMap]'); }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = new sass.types.Map(); assert.strictEqual(x.toString(), '[object SassMap]'); }); @@ -490,11 +535,21 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var number = new sass.types.Number(); assert.strictEqual(number.toString(), '[object SassNumber]'); }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var number = sass.types.Number(); assert.strictEqual(number.toString(), '[object SassNumber]'); }); @@ -585,6 +640,11 @@ describe('sass.types', function() { }); it('supports call constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = sass.types.String('OMG'); assert.strictEqual(x.toString(), '[object SassString]'); @@ -592,6 +652,11 @@ describe('sass.types', function() { }); it('supports new constructor', function() { + if(semver.gt(process.version, 'v14.5.0')) { + // v8 issue tracked in https://github.com/sass/node-sass/issues/2972 + this.skip(); + } + var x = new sass.types.String('OMG'); assert.strictEqual(x.toString(), '[object SassString]');