From 5e0ac669d0e926fb1b82555484eda0e5e263fd4d Mon Sep 17 00:00:00 2001 From: Nelson Omuto Date: Fri, 3 Oct 2014 15:46:35 -0400 Subject: [PATCH] adding specrunner and its build config for testing in browser --- .gitignore | 1 + Gruntfile.js | 16 +++++++--------- _SpecRunner.html | 43 +++++++++++++++++++++++++++++++++++++++++++ test/SpecRunner.html | 26 -------------------------- test/materialSpec.js | 1 + 5 files changed, 52 insertions(+), 35 deletions(-) create mode 100644 _SpecRunner.html delete mode 100644 test/SpecRunner.html diff --git a/.gitignore b/.gitignore index 4117a537..35e1ec4e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ Thumbs.db .DS_Store /node_modules/ +.grunt/ diff --git a/Gruntfile.js b/Gruntfile.js index 520689a8..1db1750f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -80,18 +80,16 @@ module.exports = function(grunt) { test: { options: { port: 8041, - open: 'http://localhost:8041/SpecRunner.html', - base: [ - "scripts", - "test" - ] + open: 'http://localhost:8041/_SpecRunner.html', + base: "." } } }, jasmine: { - src: 'scripts/**/*.js', + scripts: 'scripts/**/*.js', options: { + build: true, specs: 'test/*Spec.js', helpers: 'test/*Helper.js', vendor: [ @@ -153,12 +151,12 @@ module.exports = function(grunt) { buildType = "scss"; } - grunt.task.run(["newer:jshint", "test", buildType]); + grunt.task.run(["newer:jshint", "jasmine:scripts", buildType]); }); grunt.registerTask("test", [ - "connect:test", - "jasmine" + "jasmine:scripts:build", + "connect:test" ]); grunt.registerTask("serve", function(target){ diff --git a/_SpecRunner.html b/_SpecRunner.html new file mode 100644 index 00000000..fd7e0764 --- /dev/null +++ b/_SpecRunner.html @@ -0,0 +1,43 @@ + + + + + Jasmine Spec Runner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/SpecRunner.html b/test/SpecRunner.html deleted file mode 100644 index a5ff35bd..00000000 --- a/test/SpecRunner.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Unit Tests Bootstrap Material Design - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/materialSpec.js b/test/materialSpec.js index 79cc45ec..19e026fb 100644 --- a/test/materialSpec.js +++ b/test/materialSpec.js @@ -2,6 +2,7 @@ describe('Material', function (){ + //Dummy test just to ensure tests are accurately configured it('jquery should be loaded', function () { expect($).toBeDefined(); });