jest/no-large-snapshots
eslint-plugin-jest
No autofix
eslint.config.js
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/no-large-snapshots": "error",
},
},
];exports[`a large snapshot 1`] = `
line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10
line 11
line 12
line 13
line 14
line 15
line 16
line 17
line 18
line 19
line 20
line 21
line 22
line 23
line 24
line 25
line 26
line 27
line 28
line 29
line 30
line 31
// …exports[`a more manageable and readable snapshot 1`] = `
line 1
line 2
line 3
line 4
`;Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
jest/no-large-snapshots
eslint-plugin-jest
import jest from "eslint-plugin-jest";
export default [
{
plugins: { jest },
rules: {
"jest/no-large-snapshots": "error",
},
},
];jest/no-large-snapshots
jest plugin · style
{
"plugins": [
"jest"
],
"rules": {
"jest/no-large-snapshots": "error"
}
}Biome does not have this rule.
Disallow confusing usages of jest.setTimeout
Enforces a maximum number assertion calls in a test body