Skip to content

Commit

Permalink
chore: Skip constructor tests on v14.6+
Browse files Browse the repository at this point in the history
Related to tracking issue #2972
  • Loading branch information
nschonni committed Sep 28, 2020
1 parent ee3984d commit d0d8865
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/alpine.yml
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
node:
- 10
- 12
- 14.5
- 14
include:
- node: 10
gcc: "gcc-4.9"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
node:
- 10
- 12
- 14.5
- 14

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
node:
- 10
- 12
- 14.5
- 14

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
65 changes: 65 additions & 0 deletions test/types.js
Expand Up @@ -3,6 +3,7 @@

var assert = require('assert').strict;
var sass = require('../');
var semver = require('semver');

describe('sass.types', function() {
describe('Boolean', function() {
Expand All @@ -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]');

Expand Down Expand Up @@ -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]');
});
Expand Down Expand Up @@ -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]');
Expand All @@ -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]');
Expand All @@ -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]');
Expand Down Expand Up @@ -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]');
});
Expand Down Expand Up @@ -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]');
});
Expand Down Expand Up @@ -585,13 +640,23 @@ 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]');
assert.strictEqual(x.getValue(), 'OMG');
});

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]');
Expand Down

0 comments on commit d0d8865

Please sign in to comment.