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-2/

{
  "context": "This criteria evaluates the engineer's ability to use Jest's lifecycle hooks (beforeAll, beforeEach, afterEach, afterAll) to manage test setup and teardown. The focus is on correct usage of these specific hooks to coordinate database connection lifecycle.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "beforeAll hook",
      "description": "Uses beforeAll() hook to establish database connection once before all tests run",
      "max_score": 30
    },
    {
      "name": "beforeEach hook",
      "description": "Uses beforeEach() hook to clear database data before each individual test executes",
      "max_score": 25
    },
    {
      "name": "afterEach hook",
      "description": "Uses afterEach() hook to log test completion after each test finishes",
      "max_score": 20
    },
    {
      "name": "afterAll hook",
      "description": "Uses afterAll() hook to close database connection once after all tests complete",
      "max_score": 25
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-jest-each

tile.json