CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-jest-expect-message

Add custom message to Jest expects

Overall
score

99%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses jest-expect-message to add custom error messages to Jest assertions. The focus is on using the package's capability to work with different Jest matchers including standard matchers, negation, and async matchers.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Custom messages usage",
      "description": "Uses jest-expect-message to add custom error messages to assertions by passing a second parameter to expect(). At least 3 tests should include custom messages.",
      "max_score": 25
    },
    {
      "name": "Standard matchers",
      "description": "Uses custom messages with standard Jest matchers such as toBe(), toEqual(), toBeGreaterThanOrEqual(), toBeTruthy(), or toContain().",
      "max_score": 20
    },
    {
      "name": "Negated matchers",
      "description": "Uses custom messages with negated Jest matchers (using .not) such as .not.toBe(), .not.toEqual(), or .not.toBeNull().",
      "max_score": 15
    },
    {
      "name": "Async matchers",
      "description": "Uses custom messages with async Jest matchers using .resolves or .rejects for promise-based assertions.",
      "max_score": 20
    },
    {
      "name": "Multiple matcher types",
      "description": "Uses custom messages with at least 3 different types of Jest matchers (e.g., toBe, toBeGreaterThanOrEqual, toContain, toHaveProperty, toMatch, toBeTruthy).",
      "max_score": 10
    },
    {
      "name": "Package setup",
      "description": "Properly configures jest-expect-message in Jest configuration (setupFilesAfterEnv) or imports it in the test file.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-jest-expect-message

tile.json