Skip to content

Commit

Permalink
fix race in QUnit web test (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlamsl authored Mar 29, 2018
1 parent f87dc20 commit 6f98d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function hook() {
details.failures = failures;
alert(JSON.stringify(details));
});
QUnit.start();
}

if (typeof phantom === 'undefined') {
load('./src/htmlminifier');
hook();
require(process.argv[2]);
QUnit.load();
hook();
}
else {
var system = require('system');
Expand Down
1 change: 1 addition & 0 deletions tests/minifier.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* global minify */
'use strict';

QUnit.config.autostart = false;
if (typeof minify === 'undefined') {
self.minify = require('html-minifier').minify;
}
Expand Down

0 comments on commit 6f98d68

Please sign in to comment.