tessl install tessl/npm-jest-circus@29.7.0The next-gen flux-based test runner for Jest that provides test framework globals and event-driven test execution
Agent Success
Agent success rate when using this tile
82%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.91x
Baseline
Agent success rate without this tile
43%
{
"context": "This criteria evaluates the engineer's proficiency in using jest.fn() to create mock functions for testing callback-based code. The focus is on proper mock creation, configuration, and inspection capabilities provided by jest.fn().",
"type": "weighted_checklist",
"checklist": [
{
"name": "Mock function creation",
"description": "Uses jest.fn() to create mock callback functions (onEmailSent, onEmailFailed, onEmailQueued) in test setup",
"max_score": 25
},
{
"name": "Mock call verification",
"description": "Uses toHaveBeenCalled() or toHaveBeenCalledTimes() matchers to verify that mock callbacks were invoked the correct number of times",
"max_score": 25
},
{
"name": "Mock argument inspection",
"description": "Uses toHaveBeenCalledWith() matcher to verify that mock callbacks were invoked with the correct email object arguments",
"max_score": 25
},
{
"name": "Mock call history",
"description": "Accesses mock.calls or uses mock matchers to verify the sequence or count of callback invocations across multiple test cases, especially in batch processing",
"max_score": 25
}
]
}