@applitools/docker-compose-mocha
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -7,3 +7,3 @@ /* @flow */ | ||
const getAddressForService = require('./get-address-for-service'); | ||
const rp = require('request-promise'); | ||
const fetch = require('node-fetch'); | ||
@@ -53,9 +53,7 @@ const { coroutine } = Promise; | ||
try { | ||
const response = yield rp({ | ||
url: `http://${url}/healthcheck`, | ||
resolveWithFullResponse: true, | ||
const response = yield fetch(`http://${url}/healthcheck`, { | ||
timeout: 2000, | ||
}); | ||
return (response.statusCode >= 200 && response.statusCode < 500); | ||
return (response.status >= 200 && response.status < 500); | ||
} catch (err) { | ||
@@ -62,0 +60,0 @@ yield Promise.delay(1000); |
{ | ||
"name": "@applitools/docker-compose-mocha", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Tool used for setting up an isolated environment for end to end testing / integration testing using Docker Compose", | ||
@@ -22,3 +22,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"bluebird": "^3.5.1", | ||
"bluebird": "^3.5.2", | ||
"chalk": "^1.1.3", | ||
@@ -29,4 +29,3 @@ "chance": "^1.0.16", | ||
"js-yaml": "^3.12.0", | ||
"request": "^2.87.0", | ||
"request-promise": "^4.1.1" | ||
"node-fetch": "^2.2.0" | ||
}, | ||
@@ -37,3 +36,3 @@ "devDependencies": { | ||
"eslint-config-airbnb-base": "^11.1.3", | ||
"eslint-plugin-import": "^2.12.0", | ||
"eslint-plugin-import": "^2.14.0", | ||
"flow-bin": "^0.37.4", | ||
@@ -40,0 +39,0 @@ "mocha": "^5.2.0", |
@@ -10,3 +10,3 @@ const chance = require('./../../lib/setup-environment-names-seed'); | ||
const { exec } = require('child-process-promise'); | ||
const rp = require('request-promise'); | ||
const fetch = require('node-fetch'); | ||
const simulateMochaRun = require('./mocha-helper').simulateMochaRun; | ||
@@ -44,4 +44,3 @@ const pullTools = require('./../../lib/docker-pull-image-by-name'); | ||
try { | ||
const response = yield rp({ | ||
url: `http://${url}/`, | ||
const response = yield fetch(`http://${url}/`, { | ||
resolveWithFullResponse: true, | ||
@@ -52,3 +51,3 @@ timeout: 2000, | ||
console.log('From within the custom poll method..'); | ||
return (response.statusCode >= 200 && response.statusCode < 500); | ||
return (response.status >= 200 && response.status < 500); | ||
} catch (err) { | ||
@@ -69,6 +68,5 @@ yield Promise.delay(1000); | ||
const requestResult = yield rp({ | ||
uri: targetUriForService1, | ||
const requestResult = yield fetch(targetUriForService1, { | ||
timeout: 2000, | ||
}); | ||
}).then(res => res.text()); | ||
expect(requestResult).to.equal('Hello from test app on port 3001'); | ||
@@ -83,6 +81,5 @@ console.log('success!'); | ||
const request2Result = yield rp({ | ||
uri: targetUriForService2, | ||
const request2Result = yield fetch(targetUriForService2, { | ||
timeout: 2000, | ||
}); | ||
}).then(res => res.text()); | ||
expect(request2Result).to.equal('Hello from test app on port 3002'); | ||
@@ -89,0 +86,0 @@ console.log('success again!'); |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7
49391
835
6
+ Addednode-fetch@^2.2.0
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedrequest@^2.87.0
- Removedrequest-promise@^4.1.1
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedrequest-promise@4.2.6(transitive)
- Removedrequest-promise-core@1.1.4(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstealthy-require@1.1.1(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
Updatedbluebird@^3.5.2