https://github.com/gemini-testing/testplane-tabs-closer
Plugin for hermione to close opened tabs from previous tests in a browser
https://github.com/gemini-testing/testplane-tabs-closer
Last synced: 4 months ago
JSON representation
Plugin for hermione to close opened tabs from previous tests in a browser
- Host: GitHub
- URL: https://github.com/gemini-testing/testplane-tabs-closer
- Owner: gemini-testing
- Created: 2018-02-14T21:33:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-08T14:14:55.000Z (about 1 year ago)
- Last Synced: 2024-04-14T07:12:15.766Z (about 1 year ago)
- Language: JavaScript
- Size: 346 KB
- Stars: 0
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @testplane/tabs-closer
Plugin for Testplane to close opened tabs from previous tests in a browser. When your tests are opening a lot of tabs in one session, browser can degrade. So that's why you need to close opened tabs before test execution.
## Installation
```bash
npm install @testplane/tabs-closer
```## Usage
Plugin has following configuration:
* **enabled** (optional) `Boolean` – enable/disable the plugin; by default plugin is enabled
* **browsers** (optional) `Regexp` - browsers in which tabs should be closedAlso there is ability to override plugin parameters by CLI options or environment variables
(see [configparser](https://github.com/gemini-testing/configparser)).
Use `testplane_tabs_closer_` prefix for the environment variables and `--testplane-tabs-closer-` for the cli options.### Testplane usage
Add plugin to your `testplane` config file:
```js
module.exports = {
// ...
system: {
plugins: {
'@testplane/tabs-closer': {
enabled: true,
browsers: /chrome/
}
}
},
//...
}
```## Testing
Run [mocha](http://mochajs.org) tests:
```bash
npm run test-unit
```Run [eslint](http://eslint.org) codestyle verification
```bash
npm run lint
```