eslint-plugin-jest-dom 3.8.1 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@ const meta = {
31
31
  exports.meta = meta;
32
32
 
33
33
  function isAntonymMatcher(matcherNode, matcherArguments) {
34
- return matcherNode.name === "toBeNull" || usesToBeOrToEqualWithNull(matcherNode, matcherArguments) || usesToHaveLengthZero(matcherNode, matcherArguments);
34
+ return matcherNode.name === "toBeNull" || matcherNode.name === "toBeFalsy" || usesToBeOrToEqualWithNull(matcherNode, matcherArguments) || usesToHaveLengthZero(matcherNode, matcherArguments);
35
35
  }
36
36
 
37
37
  function usesToBeOrToEqualWithNull(matcherNode, matcherArguments) {
@@ -43,7 +43,7 @@ function usesToHaveLengthZero(matcherNode, matcherArguments) {
43
43
  }
44
44
 
45
45
  const create = context => {
46
- const alternativeMatchers = /^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual)$/;
46
+ const alternativeMatchers = /^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/;
47
47
 
48
48
  function getLengthValue(matcherArguments) {
49
49
  let lengthValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest-dom",
3
- "version": "3.8.1",
3
+ "version": "3.9.0",
4
4
  "description": "ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [