codeceptjs
Version:
Modern Era Acceptance Testing Framework for NodeJS
45 lines (28 loc) • 878 B
Markdown
id: Polly
title: Polly
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## Polly
**Extends MockRequest**
This helper works the same as MockRequest helper. It has been included for backwards compatibility
reasons. So use MockRequest helper instead of this.
Please refer to MockRequest helper documentation for details.
### Installations
Requires [Polly.js][1] library by Netflix installed
npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-dev
Requires Puppeteer helper or WebDriver helper enabled
### Configuration
Just enable helper in config file:
```js
helpers: {
Puppeteer: {
// regular Puppeteer config here
},
Polly: {}
}
```
The same can be done when using WebDriver helper..
### Usage
Use `I.mockRequest` to intercept and mock requests.
[1]: https://netflix.github.io/pollyjs/#/