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

@codeceptjs/configure

Package Overview
Dependencies
Maintainers
2
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.7.0 to 0.8.0

.github/workflows/publish-node.js.yml

6

CHANGELOG.md

@@ -0,1 +1,5 @@

0.8.0
* Added `setCommonPlugins` hook
0.7.0

@@ -10,2 +14,2 @@

* Added try/catch block when taking cookie for `setSharedCookie`
* CodeceptJS 3 compatibility
* CodeceptJS 3 compatibility

@@ -8,2 +8,3 @@ module.exports = {

setTestHost: require('./hooks/setTestHost'),
setCommonPlugins: require('./hooks/setCommonPlugins'),
}

4

package.json
{
"name": "@codeceptjs/configure",
"version": "0.7.0",
"version": "0.8.0",
"description": "Set of CodeceptJS config hooks to simplify configuration",

@@ -30,3 +30,3 @@ "main": "index.js",

"chai": "^4.2.0",
"codeceptjs": "^3.0.0",
"codeceptjs": "^3.3.0",
"mocha": "^8.2.1",

@@ -33,0 +33,0 @@ "puppeteer": "^2.1",

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

```
### setCommonPlugins
Enables CodeceptJS plugins which are recommened for common usage.
The list of plugins can be updated from version to version so this hook ensures that all of them are loaded and you won't need to update them in a config:
```js
// in codecept.conf.js
const { setCommonPlugins } = require('@codeceptjs/configure');
setCommonPlugins();
```
These plugins will be loaded:
* tryTo (enabled globally)
* retryFailedStep (enabled globally)
* retryTo (enabled globally)
* eachElement (enabled globally)
* pauseOnFail (disabled, should be turned on when needed)
* screenshotOnFail (enable globally)
### setSharedCookies

@@ -67,0 +87,0 @@

@@ -10,2 +10,3 @@ const Config = require('../codeceptjs').config;

setTestHost,
setCommonPlugins,
} = require('../index');

@@ -312,2 +313,38 @@

});
describe('#setCommonPlugins', () => {
it('create standard plugins', () => {
Config.reset();
const config = {
helpers: {},
}
setCommonPlugins();
Config.create(config);
expect(Config.get()).to.have.nested.property(`plugins.screenshotOnFail`);
expect(Config.get()).to.have.nested.property(`plugins.tryTo`);
expect(Config.get()).to.have.nested.property(`plugins.retryTo`);
expect(Config.get()).to.have.nested.property(`plugins.eachElement`);
});
it('should not override plugins', () => {
Config.reset();
const config = {
helpers: {},
plugins: {
screenshotOnFail: { enabled: false },
otherPlugin: {}
}
}
setCommonPlugins();
Config.create(config);
expect(Config.get()).to.have.nested.property(`plugins.screenshotOnFail`);
expect(Config.get()).to.have.nested.property(`plugins.screenshotOnFail.enabled`);
expect(Config.get().plugins.screenshotOnFail.enabled).to.be.false;
expect(Config.get()).to.have.nested.property(`plugins.tryTo`);
expect(Config.get()).to.have.nested.property(`plugins.retryTo`);
expect(Config.get()).to.have.nested.property(`plugins.eachElement`);
expect(Config.get()).to.have.nested.property(`plugins.otherPlugin`);
});
});
});
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