https://github.com/danielmschmidt/eslint-plugin-test-names
Validates if the test names are set up correctly
https://github.com/danielmschmidt/eslint-plugin-test-names
Last synced: 12 months ago
JSON representation
Validates if the test names are set up correctly
- Host: GitHub
- URL: https://github.com/danielmschmidt/eslint-plugin-test-names
- Owner: DanielMSchmidt
- Created: 2018-01-16T13:37:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:34:34.000Z (over 2 years ago)
- Last Synced: 2024-11-02T06:48:05.334Z (over 1 year ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-plugin-test-names [](https://travis-ci.org/DanielMSchmidt/eslint-plugin-test-names)
Validates if the test names don't contain a certain set of words
## Installation
You'll first need to install [ESLint](http://eslint.org):
```
$ npm i eslint --save-dev
```
Next, install `eslint-plugin-test-names`:
```
$ npm install eslint-plugin-test-names --save-dev
```
**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-test-names` globally.
## Usage
Add `test-names` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": ["test-names"]
}
```
Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"test-names/blacklist-word-in-test-name": [
2,
{ "words": ["should", "needs to"], "caseInsensitive": true }
]
}
}
```
## Supported Rules
* `blacklist-word-in-test-name`: Blacklists a word in the name of a test