From c6fb31fd49403994236caad853568de005f22831 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 9 Oct 2014 17:31:01 +0200 Subject: [PATCH] Fix phantom mocha tests --- Gruntfile.js | 14 ++++---------- package.json | 4 ++-- test/integration/index.html | 6 +++++- test/unit/index.html | 7 ++++++- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 08683e3..3f1318c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -32,19 +32,13 @@ module.exports = function(grunt) { } }, - mocha: { + mocha_phantomjs: { all: { options: { urls: [ 'http://localhost:<%= connect.test.options.port %>/test/unit/index.html', 'http://localhost:<%= connect.test.options.port %>/test/integration/index.html' - ], - run: false, - reporter: 'Spec', - log: false, - - // phanotmjs is soooo slow - timeout: 100000 + ] } } }, @@ -367,7 +361,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-mocha'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-csso'); grunt.loadNpmTasks('grunt-contrib-sass'); @@ -376,6 +369,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-compress'); grunt.loadNpmTasks('grunt-manifest'); + grunt.loadNpmTasks('grunt-mocha-phantomjs'); // Build tasks grunt.registerTask('dist-css', ['sass', 'autoprefixer', 'csso']); @@ -385,7 +379,7 @@ module.exports = function(grunt) { // Test/Dev tasks grunt.registerTask('dev', ['connect:dev']); - grunt.registerTask('test', ['jshint', 'connect:test', 'mocha']); + grunt.registerTask('test', ['jshint', 'connect:test', 'mocha_phantomjs']); grunt.registerTask('prod', ['connect:prod']); // diff --git a/package.json b/package.json index fcacaa1..5eb1d35 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,8 @@ "grunt-contrib-watch": "~0.5.3", "grunt-csso": "~0.6.1", "grunt-manifest": "^0.4.0", - "grunt-mocha": "~0.4.1", - "mocha": "~1.13.0", + "grunt-mocha-phantomjs": "^0.6.0", + "mocha": "^1.21.4", "sinon": "~1.7.3", "time-grunt": "^1.0.0" } diff --git a/test/integration/index.html b/test/integration/index.html index f3742da..1cb63de 100644 --- a/test/integration/index.html +++ b/test/integration/index.html @@ -23,7 +23,11 @@ \ No newline at end of file diff --git a/test/unit/index.html b/test/unit/index.html index 9eeb61c..99e9412 100644 --- a/test/unit/index.html +++ b/test/unit/index.html @@ -25,7 +25,12 @@