Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wdio-docker-service

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wdio-docker-service - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

test/unit/utils/dockerSpec.js

3

package.json
{
"name": "wdio-docker-service",
"version": "1.1.0",
"version": "1.1.1",
"description": "WebdriverIO service to start and stop docker container (for Selenium and more)",

@@ -48,2 +48,3 @@ "repository": {

"dependencies": {
"bluebird": "^3.5.1",
"chalk": "^2.3.0",

@@ -50,0 +51,0 @@ "fs-extra": "^5.0.0",

import fs from 'fs-extra';
import Docker from './utils/docker';
import getFilePath from './utils/getFilePath';
import Promise from 'bluebird';

@@ -5,0 +6,0 @@ const DEFAULT_LOG_FILENAME = 'docker-log.txt';

import { spawn } from 'child_process';
import Promise from 'bluebird';

@@ -3,0 +4,0 @@ const SPACE = ' ';

@@ -8,2 +8,3 @@ import camelToDash from './camel-to-dash';

import { EventEmitter } from 'events';
import Promise from 'bluebird';

@@ -13,3 +14,2 @@ const SPACE = ' ';

const MAX_INSPECT_ATTEMPTS = 10;
const DEFAULT_HEALTH_CHECK = 'http://localhost:4444';
const DEFAULT_OPTIONS = {

@@ -25,4 +25,4 @@ rm: true

* @param {String} image Docker image/tag name
* @param {Boolean} debug Enables logging
* @param {Object} options
* @param {Boolean} [debug] Enables logging
* @param {Object} [options] Docker run options
* @param {String} [healthCheck] Url that verifies that service is running

@@ -33,10 +33,14 @@ * @param {String} [command] docker command that follows image/tag name

*/
constructor(image, { debug = false, options = {}, healthCheck, command, args }, logger) {
constructor(image, { debug = false, options = {}, healthCheck, command, args } = {}, logger = console) {
super();
if (!image) {
throw new Error('Missing required image argument');
}
this.args = args;
this.cidfile = path.join(process.cwd(), `${ image.replace(/\W+/g, '_') }.cid`);
this.command = command;
this.debug = debug;
this.healthCheck = healthCheck || DEFAULT_HEALTH_CHECK;
this.debug = Boolean(debug);
this.healthCheck = healthCheck;
this.image = image;

@@ -118,2 +122,3 @@ this.logger = logger;

this.process.kill();
this.process = null;
}

@@ -230,3 +235,3 @@

if (typeof value === 'boolean') {
if (typeof value === 'boolean' && value) {
return `${prefix}${key}`;

@@ -233,0 +238,0 @@ }

Sorry, the diff of this file is not supported yet

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