From 2a4cfaa0ec362267ace3ad75bfbf9bc5c4c1ec9a Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 18 Oct 2018 17:20:31 +0200 Subject: [PATCH] tests/sourcemap: Skip test if file does not exist CI is only building the debug assets :-/ --- tests/node/sourcemap-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/node/sourcemap-test.js b/tests/node/sourcemap-test.js index dccd9789d63..75913e4f8c4 100644 --- a/tests/node/sourcemap-test.js +++ b/tests/node/sourcemap-test.js @@ -4,10 +4,10 @@ QUnit.module('sourcemap validation', function() { var assets = ['ember.debug', 'ember.prod', 'ember.min']; assets.forEach(asset => { - QUnit.test(`${asset} has only a single sourcemaps comment`, function(assert) { - var jsPath = `dist/${asset}.js`; - assert.ok(fs.existsSync(jsPath)); + var jsPath = `dist/${asset}.js`; + var exists = fs.existsSync(jsPath); + (exists ? QUnit.test : QUnit.skip)(`${asset} has only a single sourcemaps comment`, function(assert) { var contents = fs.readFileSync(jsPath, 'utf-8'); var num = count(contents, '//# sourceMappingURL='); assert.equal(num, 1);