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

jest-environment-puppeteer

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-environment-puppeteer - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

# [3.8.0](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/compare/v3.7.0...v3.8.0) (2019-01-11)
### Bug Fixes
* disconnect the browser on environment teardown ([#173](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/issues/173)) ([5d073cc](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/commit/5d073cc))
### Features
* **jest-environment-puppeteer:** accept a promise as config ([#178](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/issues/178)) ([40bc3a2](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/commit/40bc3a2))
# [3.7.0](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer/compare/v3.6.0...v3.7.0) (2018-12-11)

@@ -8,0 +24,0 @@

2

lib/PuppeteerEnvironment.js

@@ -126,2 +126,4 @@ "use strict";

}
await this.global.browser.disconnect();
}

@@ -128,0 +130,0 @@

3

lib/readConfig.js

@@ -48,4 +48,3 @@ "use strict";

const localConfig = require(absConfigPath);
const localConfig = await require(absConfigPath);
return (0, _mergeDeep.default)({}, defaultConfig, localConfig);

@@ -52,0 +51,0 @@ }

{
"name": "jest-environment-puppeteer",
"description": "Puppeteer environment for Jest.",
"version": "3.7.0",
"version": "3.8.0",
"main": "index.js",

@@ -32,3 +32,3 @@ "repository": "https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-environment-puppeteer",

},
"gitHead": "8b7df93ed52fd2edabaa7af702aaa4742e13c81b"
"gitHead": "d2355a17ca878928b17fd9a63fb547261d9fbeef"
}

@@ -82,3 +82,3 @@ # jest-environment-puppeteer

You can specify a `jest-puppeteer.config.js` at the root of the project or define a custom path using `JEST_PUPPETEER_CONFIG` environment variable.
You can specify a `jest-puppeteer.config.js` at the root of the project or define a custom path using `JEST_PUPPETEER_CONFIG` environment variable. It should export a config object or a Promise for a config object.

@@ -117,15 +117,22 @@ - `launch` <[object]> [All Puppeteer launch options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) can be specified in config. Since it is JavaScript, you can use all stuff you need, including environment.

// jest-puppeteer.config.js
const wsEndpoint = fs.readFileSync(endpointPath, 'utf8')
const fetch = require('node-fetch')
const dockerHost = 'http://localhost:9222'
module.exports = {
connect: {
browserWSEndpoint: wsEndpoint,
},
server: {
command: 'node server.js',
port: 4444,
launchTimeout: 10000,
debug: true,
},
async function getConfig () {
const response = await fetch(`${dockerHost}/json/version`)
const browserWSEndpoint = (await response.json()).webSocketDebuggerUrl
return {
connect: {
browserWSEndpoint
},
server: {
command: 'node server.js',
port: 3000,
launchTimeout: 10000,
debug: true,
}
}
}
module.exports = getConfig()
```

@@ -132,0 +139,0 @@

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