From 6c372ec3693064960f1a4e3bac8d3954bd3d0fa1 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 30 Nov 2019 18:47:06 -0800 Subject: [PATCH] [Tests] require ASSERT tests to pass - Skip one, pending https://github.com/nodejs/node/pull/30743 --- .travis.yml | 3 +-- test/cmp.js | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6bace64..4e6546a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ matrix: - node_js: "12" env: ASSERT=true TEST=true - node_js: "10" - env: ASSERT=true TEST=true + env: ASSERT=true TEST=true ALLOW_FAILURE=true allow_failures: - env: COVERAGE=true - - env: ASSERT=true TEST=true # some failures are node bugs, some are deep-equal v2 blockers diff --git a/test/cmp.js b/test/cmp.js index c929a7e..7c1ac64 100644 --- a/test/cmp.js +++ b/test/cmp.js @@ -203,7 +203,6 @@ test('arrays initiated', function (t) { t.end(); }); -// eslint-disable-next-line max-statements test('arrays assigned', function (t) { var a0 = [ undefined, @@ -239,7 +238,6 @@ test('arrays assigned', function (t) { t.end(); }); -// eslint-disable-next-line max-statements test('arrays push', function (t) { var a0 = [ undefined, @@ -505,8 +503,9 @@ test('getters', { skip: !Object.defineProperty }, function (t) { t.end(); }); +var isAssertAndNode1321 = process.env.ASSERT && process.version.replace(/^v/g, '').replace(/[^.]+(?:.)?/g, function (x, i) { return x * Math.pow(10, i); }) <= '1320000'; // eslint-disable-next-line no-proto -test('fake arrays: extra keys will be tested', { skip: [].__proto__ !== Array.prototype }, function (t) { +test('fake arrays: extra keys will be tested', { skip: [].__proto__ !== Array.prototype || isAssertAndNode1321 }, function (t) { var a = { __proto__: Array.prototype, 0: 1,