Skip to content

Commit

Permalink
Tests: Modify Gruntfile and package.json to support intern and chrome…
Browse files Browse the repository at this point in the history
…driver
  • Loading branch information
apsdehal committed May 29, 2015
1 parent b155829 commit b8ff7ff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
26 changes: 22 additions & 4 deletions Gruntfile.js
Expand Up @@ -3,9 +3,13 @@ module.exports = function( grunt ) {
"use strict";

var isConnectTestRunning,
serverOptions = {},
binPath = require( "chromedriver" ).path,
rdefineEnd = /\}\);[^}\w]*$/,
pkg = grunt.file.readJSON( "package.json" );

serverOptions[ "Dwebdriver.chrome.driver=" + binPath ] = "";

function camelCase( input ) {
return input.toLowerCase().replace( /[-/](.)/g, function( match, group1 ) {
return group1.toUpperCase();
Expand Down Expand Up @@ -462,6 +466,17 @@ module.exports = function( grunt ) {
packageManager: "npm"
}
}
},
"start-selenium-server": {
dev: {
options: {
downloadUrl: "https://selenium-release.storage.googleapis.com/2.45/" +
"selenium-server-standalone-2.45.0.jar",
downloadLocation: "node_modules/grunt-selenium-server/",
serverOptions: serverOptions,
systemProperties: {}
}
}
}
});

Expand All @@ -477,7 +492,6 @@ module.exports = function( grunt ) {
grunt.task.run( [ "qunit" ].concat( args ).join( ":" ) );
});

// Default task.
grunt.registerTask( "default", [
"jshint:grunt",
"jshint:source",
Expand All @@ -487,22 +501,26 @@ module.exports = function( grunt ) {

// TODO fix issues, enable
//"jscs:test",
"test:unit",
"clean",
"requirejs",
"copy",
"jshint:dist",

// TODO fix issues, enable
// "jscs:dist",
"test:functional",
"uglify",
"compare_size",
"commitplease"
]);

grunt.registerTask( "test-ci", [
"default",
"test:ci"
]);

grunt.registerTask( "test-local", [
"default",
"start-selenium-server",
"intern:globalize"
]);

};
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -70,6 +70,7 @@
"cldr-data": ">=25"
},
"devDependencies": {
"chromedriver": "2.13.0",
"grunt": "0.4.5",
"grunt-check-dependencies": "0.6.0",
"grunt-commitplease": "0.0.5",
Expand All @@ -83,8 +84,9 @@
"grunt-contrib-uglify": "0.6.0",
"grunt-contrib-watch": "0.6.1",
"grunt-jscs": "0.7.1",
"grunt-selenium-server": "0.1.2",
"gzip-js": "0.3.2",
"intern": "git://github.com/theintern/intern#master",
"intern": "git://github.com/theintern/intern.git",
"matchdep": "0.3.0",
"requirejs": "2.1.17"
},
Expand All @@ -95,6 +97,6 @@
}
],
"scripts": {
"test": "grunt"
"test": "grunt test-ci"
}
}

0 comments on commit b8ff7ff

Please sign in to comment.