Add testing via grunt.
authorSalvatore Iovene <salvatore@iovene.com>
Mon, 29 Apr 2013 11:44:34 +0000 (14:44 +0300)
committerSalvatore Iovene <salvatore@iovene.com>
Mon, 29 Apr 2013 11:44:34 +0000 (14:44 +0300)
Gruntfile.js
package.json
tests/index.html

index 4ce431f..421b474 100644 (file)
@@ -157,6 +157,11 @@ module.exports = function(grunt) {
         ], dest: 'dist/cowhide-spruce-night.css'
       }
     },
+    qunit: {
+        files: [
+            'tests/index.html'
+        ]
+    },
     uglify: {
       cowhide: {
         src: ['dist/cowhide.js'],
@@ -224,6 +229,7 @@ module.exports = function(grunt) {
   grunt.loadNpmTasks('grunt-update-submodules');
   grunt.loadNpmTasks('grunt-contrib-clean');
   grunt.loadNpmTasks('grunt-contrib-jshint');
+  grunt.loadNpmTasks('grunt-contrib-qunit');
   grunt.loadNpmTasks('grunt-contrib-less');
   grunt.loadNpmTasks('grunt-contrib-concat');
   grunt.loadNpmTasks('grunt-contrib-uglify');
@@ -232,5 +238,6 @@ module.exports = function(grunt) {
   grunt.loadNpmTasks('grunt-exec');
   grunt.loadNpmTasks('grunt-contrib-compress');
 
-  grunt.registerTask('default', ['update_submodules', 'clean', 'jshint', 'less', 'concat', 'uglify', 'cssmin', 'copy', 'exec:build_docs', 'compress']);
+  grunt.registerTask('test', ['qunit']);
+  grunt.registerTask('default', ['update_submodules', 'clean', 'jshint', 'less', 'concat', 'qunit', 'uglify', 'cssmin', 'copy', 'exec:build_docs', 'compress']);
 };
index d6b3b32..3d5be08 100644 (file)
@@ -41,6 +41,7 @@
             "grunt-contrib-copy": ">= 0.4.1",
             "grunt-contrib-compress": ">= 0.5.0",
             "grunt-contrib-clean": ">= 0.4.1",
+            "grunt-contrib-qunit": ">= 0.2.1",
 
             "grunt-exec": ">= 0.4.0",
             "grunt-growl": "0.1.2",
index 4be06fe..695c8c1 100644 (file)
@@ -12,9 +12,6 @@
   <link rel="stylesheet" href="../lib/qunit/qunit/qunit.css" type="text/css" media="screen" />
   <script src="../lib/qunit/qunit/qunit.js"></script>
 
-  <!-- phantomjs logging script-->
-  <script src="unit/bootstrap-phantom.js"></script>
-
   <!--  plugin sources -->
   <script src="../src/bootstrap/js/bootstrap-transition.js"></script>
   <script src="../src/bootstrap/js/bootstrap-alert.js"></script>