aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-09-11 15:18:34 -0500
committerMichał Gołębiowski <m.goleb@gmail.com>2014-12-18 00:51:18 +0100
commit998556fafb1725242104ef1acc02196265b3689a (patch)
treeacf67a271782da3763392c7caca85849ec66bc21
parent685fae903a344078d059e4f726edaaa4754fc18a (diff)
downloadjquery-998556fafb1725242104ef1acc02196265b3689a.tar.gz
jquery-998556fafb1725242104ef1acc02196265b3689a.zip
Build: Smoke test on Node with jsdom
-rw-r--r--Gruntfile.js15
-rw-r--r--package.json1
2 files changed, 15 insertions, 1 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 0bee7a8e8..bb0a48d2a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -144,9 +144,22 @@ module.exports = function( grunt ) {
grunt.registerTask( "bower", "bowercopy" );
grunt.registerTask( "lint", [ "jshint", "jscs" ] );
+ grunt.registerTask( "node-smoke-test", function() {
+ var done = this.async();
+ require( "jsdom" ).env( "", function( errors, window ) {
+ if ( errors ) {
+ console.error( errors );
+ done( false );
+ }
+ require( "./" )( window );
+ done();
+ });
+ });
+
// Short list as a high frequency watch task
grunt.registerTask( "dev", [ "build:*:*", "lint" ] );
// Default grunt
- grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "compare_size" ] );
+ grunt.registerTask( "default",
+ [ "jsonlint", "dev", "uglify", "dist:*", "compare_size", "node-smoke-test" ] );
};
diff --git a/package.json b/package.json
index 1bbc7842e..37bd4330b 100644
--- a/package.json
+++ b/package.json
@@ -42,6 +42,7 @@
"grunt-jscs-checker": "0.4.1",
"grunt-jsonlint": "1.0.4",
"gzip-js": "0.3.2",
+ "jsdom": "1.5.0",
"load-grunt-tasks": "0.3.0",
"requirejs": "2.1.10",
"testswarm": "1.1.0"