jest-environment-puppeteer
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.2.0"></a> | ||
# [0.2.0](https://github.com/smooth-code/jest-environment-puppeteer/compare/v0.1.0...v0.2.0) (2018-03-03) | ||
### Features | ||
* support Puppeteer configuration ([31972ae](https://github.com/smooth-code/jest-environment-puppeteer/commit/31972ae)) | ||
<a name="0.1.0"></a> | ||
@@ -7,0 +17,0 @@ # 0.1.0 (2018-03-02) |
@@ -23,2 +23,6 @@ 'use strict'; | ||
var _readConfig = require('./readConfig'); | ||
var _readConfig2 = _interopRequireDefault(_readConfig); | ||
var _constants = require('./constants'); | ||
@@ -31,6 +35,4 @@ | ||
async function setup() { | ||
browser = await _puppeteer2.default.launch({ | ||
args: ['--no-sandbox', '--disable-setuid-sandbox'], | ||
headless: process.env.HEADLESS !== 'false' | ||
}); | ||
const config = await (0, _readConfig2.default)(); | ||
browser = await _puppeteer2.default.launch(config); | ||
_mkdirp2.default.sync(_constants.DIR); | ||
@@ -37,0 +39,0 @@ _fs2.default.writeFileSync(_constants.WS_ENDPOINT_PATH, browser.wsEndpoint()); |
{ | ||
"name": "jest-environment-puppeteer", | ||
"description": "Run your tests using Jest & Puppeteer.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"main": "index.js", | ||
@@ -20,2 +20,3 @@ "repository": "git@github.com:smooth-code/jest-environment-puppeteer.git", | ||
"ci": "yarn build && yarn lint && yarn test", | ||
"dev": "babel src -d lib --watch", | ||
"format": "prettier --write \"src/**/*.js\" \"*.md\" \"*.js\"", | ||
@@ -46,2 +47,3 @@ "lint": "eslint .", | ||
"dependencies": { | ||
"cwd": "^0.10.0", | ||
"mkdirp": "^0.5.1", | ||
@@ -48,0 +50,0 @@ "rimraf": "^2.6.2" |
@@ -42,6 +42,20 @@ # jest-environment-puppeteer | ||
### Writing test using Puppeteer | ||
### Writing tests using Puppeteer | ||
Writing test using Puppeteer is simple, you can find all available methods in [Puppeteer documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md). | ||
To write your integration tests using Puppeteer you can find all available methods in [Puppeteer documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md). | ||
### Configure Puppeteer | ||
Jest Puppeteer automatically detect the best config to start Puppeteer but sometimes you may need to specify custom options. | ||
[All Puppeteer launch options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) can be specified in `jest-puppeteer.config.js` at the root of the project. Since it is JavaScript, you can use all stuff you need, including environment. | ||
```js | ||
// jest-puppeteer.config.js | ||
module.exports = { | ||
dumpio: true, | ||
headless: process.env.HEADLESS !== 'false', | ||
} | ||
``` | ||
### Extend PuppeteerEnvironment | ||
@@ -48,0 +62,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
10856
12
94
137
5
6
+ Addedcwd@^0.10.0
+ Addedcwd@0.10.0(transitive)
+ Addedexpand-tilde@1.2.2(transitive)
+ Addedfind-file-up@0.1.3(transitive)
+ Addedfind-pkg@0.1.2(transitive)
+ Addedfs-exists-sync@0.1.0(transitive)
+ Addedglobal-modules@0.2.3(transitive)
+ Addedglobal-prefix@0.1.5(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-windows@0.2.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedresolve-dir@0.1.1(transitive)
+ Addedwhich@1.3.1(transitive)