Skip to content

Commit db88017

Browse files
committed
Fix flaky js test by not using QUnit autostart.
Previously, gulp-qunit would occasionally fail since QUnit had already started but jquery async loading of test files had note yet completed, resulting in errors like: Testing test.html Took 34ms to run 0 tests. 0 passed, 0 failed. No tests were executed. Are you loading tests asynchronously? As part of the fix I upgraded to QUnit 2.0 since its assert.async() statement makes this easier to handle than the QUnit.start/stop methods in QUnit 1.
1 parent 5aa4a0f commit db88017

File tree

6 files changed

+4908
-2564
lines changed

6 files changed

+4908
-2564
lines changed

js/test/gulpfile.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
var gulp = require('gulp'),
2-
qunit = require('gulp-qunit');
1+
var gulp = require('gulp');
2+
var qunit = require('gulp-qunit');
33

4-
gulp.task('default', function() {
5-
return gulp.src('./test.html')
6-
.pipe(qunit());
4+
gulp.task('test', function() {
5+
return gulp.src('./test.html').pipe(qunit());
76
});
7+
8+
gulp.task('default', ['test']);

js/test/qunit-1.14.0.css

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)