From 569b508fd59de5ad5854c9e776b863900e2e2636 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Sun, 8 Jan 2017 16:39:55 +0100 Subject: [PATCH] mutualize casperjsOptions in gruntfile --- Gruntfile.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 393e6010..95d7042f 100644 --- a/Gruntfile.js +++ b/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 } } },