CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-jest-each

Parameterised tests for Jest that enable running the same test multiple times with different data sets using arrays or tagged template literals

85

1.10x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates the engineer's ability to use Jest's mock return value configuration methods (mockReturnValue, mockResolvedValue, mockRejectedValue) to control mock function behavior for both synchronous and asynchronous testing scenarios.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "mockReturnValue usage",
      "description": "Uses jest.fn().mockReturnValue() or mockReturnValue() on a mock to configure synchronous return values for the getUserById test",
      "max_score": 30
    },
    {
      "name": "mockResolvedValue usage",
      "description": "Uses jest.fn().mockResolvedValue() or mockResolvedValue() on a mock to configure async resolved values for the createUser test",
      "max_score": 30
    },
    {
      "name": "mockRejectedValue usage",
      "description": "Uses jest.fn().mockRejectedValue() or mockRejectedValue() on a mock to configure async rejected values for the deleteUser test",
      "max_score": 30
    },
    {
      "name": "Test structure",
      "description": "Properly structures tests using Jest's describe() and test()/it() blocks, and correctly handles async tests where required",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-jest-each

tile.json