From 9ead6fcca9deba5ac4d8be49dcfca06a0c2f75b0 Mon Sep 17 00:00:00 2001 From: jekkos Date: Fri, 20 Mar 2015 13:50:14 +0100 Subject: [PATCH] Add mochaSelenium config in Gruntfile (tests not running yet) --- Gruntfile.js | 15 +++++++++++++++ package.json | 12 ++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c52d70227..425039a2f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -59,6 +59,21 @@ module.exports = function(grunt) { dest: 'application/views/partial/header.php' } }, + mochaSelenium: { + options : { + reporter: 'spec', + timeout: 30e3, + usePromises: true, + useSystemPhantom: true + }, + phantomjs: { + src: ['test/*.js'], + options: { + // phantomjs must be in the $PATH when invoked + browserName: 'phantomjs' + } + } + }, watch: { files: ['<%= jshint.files %>'], tasks: ['jshint'] diff --git a/package.json b/package.json index 82f337233..c6def0df5 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,14 @@ "license": "MIT", "devDependencies": { "grunt": "^0.4.5", - "grunt-contrib-jshint": "~0.6.3", - "grunt-contrib-watch": "~0.5.3", "grunt-contrib-concat": "~0.5.1", + "grunt-contrib-jshint": "~0.6.3", "grunt-contrib-uglify": "~0.8.0", - "grunt-script-link-tags": "~1.0.3" + "grunt-contrib-watch": "~0.5.3", + "grunt-mocha-selenium": "~1.0.1", + "grunt-script-link-tags": "~1.0.3", + "grunt-selenium-launcher": "^0.1.1", + "mocha": "^2.2.1", + "phantomjs": "^1.9.7-8" } -} +}