Socket
Socket
Sign inDemoInstall

grunt-selenium-server

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-selenium-server - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

9

Gruntfile.js

@@ -9,3 +9,6 @@ /*

module.exports = function (grunt) {
var seleniumVersion = grunt.option('seleniumVersion') || '2.46.0';
var seleniumMinorVersion = seleniumVersion.split('.').slice(0, 2).join('.');

@@ -24,3 +27,7 @@ grunt.initConfig({

'start-selenium-server': {
test: {}
test: {
options: {
downloadUrl: 'https://selenium-release.storage.googleapis.com/' + seleniumMinorVersion + '/selenium-server-standalone-' + seleniumVersion + '.jar'
}
}
},

@@ -27,0 +34,0 @@

3

package.json
{
"name": "grunt-selenium-server",
"version": "0.1.3",
"version": "0.1.4",
"description": "Grunt task to start/stop a local Selenium standalon server.",

@@ -8,2 +8,3 @@ "main": "Gruntfile.js",

"license": "MIT",
"repository": "git@github.com:pifantastic/grunt-selenium-server.git",
"devDependencies": {

@@ -10,0 +11,0 @@ "grunt": "~0.4.1",

@@ -39,4 +39,9 @@

request(options.downloadUrl).on('response', function (res) {
if(res.statusCode > 200 && res.statusCode < 300) {
grunt.fail.fatal(options.downloadUrl + " returns " + res.statusCode);
if(res.statusCode >= 400) {
fs.unlink(destination, function (err) {
if (err)
grunt.log.error(err);
cb(null, new Error(options.downloadUrl + " returns " + res.statusCode));
})
return;
}

@@ -112,3 +117,3 @@ // Full length of file.

var str = data.toString();
if (str.match(/Selenium is already running/)) {
if (str.match(/^Error: /) || str.match(/Selenium is already running/)) {
cb(new Error(str));

@@ -123,3 +128,3 @@ }

// Wait a tiny bit more time just because it's java and I'm worried.
setTimeout(function(){
setTimeout(function() {
complete = true;

@@ -136,2 +141,4 @@ cb(null);

childProcesses[target].on('error', cb);
// Timeout case

@@ -138,0 +145,0 @@ setTimeout(function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc