mutualize casperjsOptions in gruntfile
This commit is contained in:
parent
d30f6a05d1
commit
569b508fd5
1 changed files with 12 additions and 16 deletions
28
Gruntfile.js
28
Gruntfile.js
|
@ -32,6 +32,16 @@ module.exports = function(grunt) {
|
|||
var stylePaths = require('./src/piskel-style-list.js').styles;
|
||||
var piskelStyles = prefixPaths(stylePaths, "src/");
|
||||
|
||||
// Casper JS tests
|
||||
var casperjsOptions = [
|
||||
'--baseUrl=http://' + hostname + ':' + PORT.TEST,
|
||||
'--mode=?debug',
|
||||
'--verbose=false',
|
||||
'--log-level=info',
|
||||
'--print-command=false',
|
||||
'--print-file-paths=true',
|
||||
];
|
||||
|
||||
var drawingTestPaths = require('./test/casperjs/TestSuite.js').tests;
|
||||
var drawingTests = prefixPaths(drawingTestPaths, "test/casperjs/");
|
||||
|
||||
|
@ -273,14 +283,7 @@ module.exports = function(grunt) {
|
|||
src: drawingTests
|
||||
},
|
||||
options : {
|
||||
casperjsOptions: [
|
||||
'--baseUrl=http://' + hostname + ':' + PORT.TEST,
|
||||
'--mode=?debug',
|
||||
'--verbose=false',
|
||||
'--log-level=info',
|
||||
'--print-command=false',
|
||||
'--print-file-paths=true',
|
||||
]
|
||||
casperjsOptions: casperjsOptions
|
||||
}
|
||||
},
|
||||
integration : {
|
||||
|
@ -288,14 +291,7 @@ module.exports = function(grunt) {
|
|||
src: integrationTests
|
||||
},
|
||||
options : {
|
||||
casperjsOptions: [
|
||||
'--baseUrl=http://' + hostname + ':' + PORT.TEST,
|
||||
'--mode=?debug',
|
||||
'--verbose=false',
|
||||
'--log-level=info',
|
||||
'--print-command=false',
|
||||
'--print-file-paths=true',
|
||||
]
|
||||
casperjsOptions: casperjsOptions
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue