From c5b304bb78e1c5084477e3e9eba061ccd63216e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 9 Jun 2019 14:57:02 +0200 Subject: [PATCH] Exclude gradients-2 test again on phantomjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverting 5cb93ec46e8f3845b8d270349eba934791cc134e 🤦‍♂️ The isNode() shenanigans was masking this issue --- test/helpers.js | 4 ++-- test/tests/SvgImport.js | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index ceac3891..cc8cabf5 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -10,10 +10,10 @@ * All rights reserved. */ -// We call our variable `isNodeContext` because resemblejs exposes a global +// We call our variable `isNodeContext` because resemble.js exposes a global // `isNode` function which would override it and break node check. var isNodeContext = typeof global === 'object', - isPhantom = typeof window === 'object' && !!window.callPhantom, + isPhantomContext = typeof window === 'object' && !!window.callPhantom, scope; if (isNodeContext) { diff --git a/test/tests/SvgImport.js b/test/tests/SvgImport.js index 140d30f1..a7dc2a48 100644 --- a/test/tests/SvgImport.js +++ b/test/tests/SvgImport.js @@ -192,15 +192,17 @@ if (!isNodeContext) { 'symbols': {}, 'blendModes': {}, 'gradients-1': {}, - 'gradients-2': {}, + 'gradients-2': !isPhantomContext && {}, 'gradients-3': {}, 'gradients-4': {} }; Base.each(svgFiles, function(options, name) { - name += '.svg'; - test('Import ' + name, function(assert) { - importSVG(assert, 'assets/' + name, null, options); - }); + if (options) { + name += '.svg'; + test('Import ' + name, function(assert) { + importSVG(assert, 'assets/' + name, null, options); + }); + } }); test('Import inexistent file', function(assert) {