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

@codeceptjs/configure

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codeceptjs/configure - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

codeceptjs.js

5

index.js
module.exports = {
useHeadlessWhen: require('./hooks/useHeadlessWhen'),
useSharedCookies: require('./hooks/useSharedCookies'),
setHeadlessWhen: require('./hooks/setHeadlessWhen'),
setSharedCookies: require('./hooks/setSharedCookies'),
setWindowSize: require('./hooks/setWindowSize'),
}

16

package.json
{
"name": "@codeceptjs/configure",
"version": "0.2.0",
"version": "0.2.1",
"description": "Set of CodeceptJS config hooks to simplify configuration",
"main": "index.js",
"scripts": {
"test": "mocha index_test.js",
"test": "mocha test/index_test.js",
"test-integration": "cd test/integration && CI=true npx codeceptjs run",
"publish": "npm publish --access public"

@@ -17,5 +18,2 @@ },

],
"peerDependencies": {
"codeceptjs": "codeception/codeceptjs"
},
"author": "Michael Bodnarchuk",

@@ -28,9 +26,11 @@ "license": "ISC",

"dependencies": {
"codeceptjs": "github:codeception/codeceptjs",
"lodash.merge": "^4.6.2"
"lodash.merge": "^4.6.2",
"lodash.mergewith": "^4.6.2"
},
"devDependencies": {
"chai": "^4.2.0",
"mocha": "^6.2.0"
"codeceptjs": "github:codeception/codeceptjs",
"mocha": "^6.2.0",
"puppeteer": "^1.20.0"
}
}

@@ -7,3 +7,3 @@ ## CodeceptJS Configuration Hooks [![Build Status](https://travis-ci.org/codecept-js/configure.svg?branch=master)](https://travis-ci.org/codecept-js/configure)

### useHeadlessWhen
### setHeadlessWhen

@@ -16,10 +16,10 @@ Toggle headless mode for Puppeteer, WebDriver, TestCafe, and Nightmare on condition.

// in codecept.conf.js
const { useHeadlessWhen } = require('@codeceptjs/configure');
const { setHeadlessWhen } = require('@codeceptjs/configure');
// enable headless only if environment variable HEADLESS exist
useHeadlessWhen(process.env.HEADLESS);
// Use it like:
//
// HEADLESS=true npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
// or enable headless on CI
useHeadlessWhen(process.env.CI);
exports.config = {

@@ -38,3 +38,3 @@ helpers: {

### useSharedCookies
### setSharedCookies

@@ -48,6 +48,6 @@ Shares cookies between browser and REST/GraphQL helpers.

// in codecept.conf.js
const { useSharedCookies } = require('@codeceptjs/configure');
const { setSharedCookies } = require('@codeceptjs/configure');
// share cookies between browser helpers and REST/GraphQL
useSharedCookies();
setSharedCookies();

@@ -74,2 +74,21 @@ exports.config = {

### setWindowSize
Universal way to set a browser window size. For Puppeteer this launches Chrome browser with a specified width and height dimensions without changing viewport size.
Usage: `setWindowSize(width, height)`.
```js
// in codecept.conf.js
const { setWindowSize } = require('@codeceptjs/configure');
setWindowSize(1600, 1200);
exports.config = {
helpers: {
Puppeteer: {}
}
}
```
## Contributing

@@ -76,0 +95,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