eslint-plugin-jest-dom
Version:
ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom
20 lines (19 loc) • 629 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.queries = void 0;
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 = exports.queries = theQueries;