Add custom message to Jest expects
Overall
score
99%
{
"context": "This evaluation assesses the engineer's proficiency in using jest-expect-message configuration options (showPrefix, showMatcherMessage, showStack) to control error message display. The focus is on proper usage of the third parameter options object to customize test failure output.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Package setup",
"description": "jest-expect-message is properly configured in the test environment (e.g., via setupFilesAfterEnv in Jest config or required in test file)",
"max_score": 15
},
{
"name": "Custom messages provided",
"description": "expect() calls include custom error messages as the second parameter throughout the test suite",
"max_score": 20
},
{
"name": "showPrefix option usage",
"description": "At least one test uses the showPrefix option (set to either true or false) in the third parameter options object",
"max_score": 15
},
{
"name": "showMatcherMessage option usage",
"description": "At least one test uses the showMatcherMessage option (set to either true or false) in the third parameter options object",
"max_score": 15
},
{
"name": "showStack option usage",
"description": "At least one test uses the showStack option (set to either true or false) in the third parameter options object",
"max_score": 15
},
{
"name": "Multiple configurations",
"description": "Tests demonstrate at least two different configuration combinations using different values for the three options (showPrefix, showMatcherMessage, showStack)",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-jest-expect-messagedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10