eslint-plugin-jest-dom 5.9.1 → 5.10.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.
|
@@ -29,7 +29,7 @@ const meta = exports.meta = {
|
|
|
29
29
|
hasSuggestions: true
|
|
30
30
|
};
|
|
31
31
|
function isAntonymMatcher(matcherNode, matcherArguments) {
|
|
32
|
-
return matcherNode.name === "toBeNull" || matcherNode.name === "toBeFalsy" || usesToBeOrToEqualWithNull(matcherNode, matcherArguments) || usesToHaveLengthZero(matcherNode, matcherArguments);
|
|
32
|
+
return matcherNode.name === "toBeNil" || matcherNode.name === "toBeNull" || matcherNode.name === "toBeNullable" || matcherNode.name === "toBeFalsy" || usesToBeOrToEqualWithNull(matcherNode, matcherArguments) || usesToHaveLengthZero(matcherNode, matcherArguments);
|
|
33
33
|
}
|
|
34
34
|
function usesToBeOrToEqualWithNull(matcherNode, matcherArguments) {
|
|
35
35
|
return (matcherNode.name === "toBe" || matcherNode.name === "toEqual") && matcherArguments[0].value === null;
|
|
@@ -56,7 +56,7 @@ function getDTLQueryIdentifierNode(callExpressionNode) {
|
|
|
56
56
|
return callExpressionNode.callee.property;
|
|
57
57
|
}
|
|
58
58
|
const create = context => {
|
|
59
|
-
const alternativeMatchers = /^(toHaveLength|toBeDefined|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/;
|
|
59
|
+
const alternativeMatchers = /^(toHaveLength|toBeDefined|toBeNil|toBeNullable|toBeNull|toBe|toEqual|toBeTruthy|toBeFalsy)$/;
|
|
60
60
|
function getLengthValue(matcherArguments) {
|
|
61
61
|
let lengthValue;
|
|
62
62
|
if (matcherArguments[0].type === "Identifier") {
|