jquery/build/tasks/promises_aplus_tests.js
Michał Gołębiowski-Owczarek 81be78e380 Build: increase timeout in Promises/A+ tests 10 times
The promises-aplus-tests sets up a default 200 ms Mocha timeout. This makes
our tests randomly fail on Jenkins. 2 seconds will be safer.

Closes gh-3791
2017-09-25 19:27:50 +02:00

27 lines
732 B
JavaScript

module.exports = function( grunt ) {
"use strict";
var timeout = 2000,
spawnTest = require( "./lib/spawn_test.js" );
grunt.registerTask( "promises_aplus_tests",
[ "promises_aplus_tests:deferred", "promises_aplus_tests:when" ] );
grunt.registerTask( "promises_aplus_tests:deferred", function() {
spawnTest( this.async(),
__dirname + "/../../node_modules/.bin/promises-aplus-tests" +
" test/promises_aplus_adapters/deferred.js" +
" --timeout " + timeout
);
} );
grunt.registerTask( "promises_aplus_tests:when", function() {
spawnTest( this.async(),
__dirname + "/../../node_modules/.bin/promises-aplus-tests" +
" test/promises_aplus_adapters/when.js" +
" --timeout " + timeout
);
} );
};