eslint-plugin-jest-dom
Advanced tools
Comparing version 5.0.2 to 5.1.0
@@ -7,4 +7,16 @@ "use strict"; | ||
exports.queries = void 0; | ||
var _dom = require("@testing-library/dom"); | ||
const queries = Object.keys(_dom.queries); | ||
let theQueries = ["findAllBy", "findBy", "getAllBy", "getBy", "queryAllBy", "queryBy"].flatMap(prefix => ["AltText", "DisplayValue", "LabelText", "PlaceholderText", "Role", "TestId", "Text", "Title"].map(element => `${prefix}${element}`)); | ||
(() => { | ||
try { | ||
const { | ||
queries: allQueries | ||
} = require("@testing-library/dom"); | ||
theQueries = Object.keys(allQueries); | ||
} catch (error) { | ||
if (error.code !== "MODULE_NOT_FOUND") { | ||
throw error; | ||
} | ||
} | ||
})(); | ||
const queries = theQueries; | ||
exports.queries = queries; |
{ | ||
"name": "eslint-plugin-jest-dom", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"description": "ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom", | ||
@@ -61,2 +61,7 @@ "main": "dist/index.js", | ||
}, | ||
"peerDependenciesMeta": { | ||
"@testing-library/dom": { | ||
"optional": true | ||
} | ||
}, | ||
"eslintConfig": { | ||
@@ -63,0 +68,0 @@ "extends": "./node_modules/kcd-scripts/eslint.js", |
82869
1348