Add custom message to Jest expects
99
Pending
Does it follow best practices?
Impact
99%
1.47xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This criteria evaluates how effectively an engineer uses jest-expect-message to add custom error messages to Jest assertions. The focus is on proper usage of the library's API including the second message parameter, configuration options, and appropriate application across synchronous and asynchronous test scenarios.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Basic custom messages",
"description": "Uses expect() with custom message as second parameter (e.g., expect(value, 'descriptive message').toBe(expected)) in at least 3 test cases",
"max_score": 30
},
{
"name": "Async matcher messages",
"description": "Applies custom messages to asynchronous assertions using .resolves or .rejects matchers (e.g., expect(promise, 'message').resolves.toBe() or expect(promise, 'message').rejects.toThrow())",
"max_score": 25
},
{
"name": "Message quality",
"description": "Custom messages are descriptive, contextual, and clearly explain what is being tested or what failure would indicate (not just repeating the assertion)",
"max_score": 20
},
{
"name": "Configuration options",
"description": "Uses the optional third parameter to configure error display (e.g., { showPrefix: false }, { showMatcherMessage: false }, or { showStack: false }) in at least one test",
"max_score": 15
},
{
"name": "Setup configuration",
"description": "Properly configures jest-expect-message in Jest setup (e.g., imports 'jest-expect-message' in test file or configures in setupFilesAfterEnv)",
"max_score": 10
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10