Skip to content

Commit cf72381

Browse files
committed
grunt sans url
1 parent 793b35f commit cf72381

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

Gruntfile.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,23 @@ module.exports = function (grunt) {
203203
},
204204
qUnit: {
205205
command: function(){
206-
return "phantomjs interfaces/navigateur/public/testUnit/run-qunit.js http://geodev10.sso.msp.gouv.qc.ca/igo_navigateur/testUnit/ | \
206+
return "phantomjs interfaces/navigateur/public/testUnit/run-qunit.js <%= pkg.urlTestUnit %> | \
207207
grep 'failures=\"0\"'";
208208
},
209209
options: {
210+
execOptions:{
211+
timeout: 30000
212+
},
210213
callback: function log(err, stdout, stderr, cb) {
214+
if(!stdout){
215+
grunt.log.subhead('Tests échecs');
216+
if(err && err.signal === "SIGTERM"){
217+
grunt.log.error("timeout");
218+
} else {
219+
grunt.log.error("Dans package.json, veillez définir 'urlTestUnit'");
220+
}
221+
return cb(new Error('Tests échecs'));
222+
}
211223
var patternT = /tests=\"[0-9]*\"/;
212224
var matchT = patternT.exec(stdout);
213225
var tests = matchT[0].substring(7, matchT[0].length-1);

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "igo",
3-
"version": "1.0.0",
2+
"name": "Igo",
3+
"version": "1.1.0",
44
"authors": [
55
"Marc-André Barbeau <[email protected]>"
66
],

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "Igo",
33
"version": "1.1.0",
4+
"urlTestUnit": "",
45
"devDependencies": {
56
"grunt": "^0.4.5",
67
"grunt-bower": "^0.19.0",

0 commit comments

Comments
 (0)