Skip to content

Commit

Permalink
tests/sourcemap: Skip test if file does not exist
Browse files Browse the repository at this point in the history
CI is only building the debug assets :-/
  • Loading branch information
Turbo87 committed Oct 18, 2018
1 parent fcd862a commit 2a4cfaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/node/sourcemap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a4cfaa

Please sign in to comment.