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

{
  "context": "This evaluation assesses the engineer's ability to use jest-expect-message for adding custom error messages to test assertions with various configuration combinations. The focus is on proper usage of the package's configuration options (showPrefix, showMatcherMessage, showStack) in different test scenarios.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package setup",
      "description": "The engineer correctly sets up jest-expect-message in the Jest configuration (setupFilesAfterEnv) to make custom messages available globally across all test files.",
      "max_score": 15
    },
    {
      "name": "Custom message usage",
      "description": "Uses the expect function with custom message parameter syntax: expect(actual, message) or expect(actual, message, options) in test assertions.",
      "max_score": 20
    },
    {
      "name": "Default configuration",
      "description": "Demonstrates understanding of default behavior by using expect(value, message) without options in at least one test, allowing all three defaults (showPrefix: true, showMatcherMessage: true, showStack: true) to apply.",
      "max_score": 15
    },
    {
      "name": "showPrefix control",
      "description": "Uses the showPrefix option correctly by passing {showPrefix: false} as the third parameter to expect to hide the 'Custom message:' prefix in at least one test.",
      "max_score": 15
    },
    {
      "name": "Multiple option combination",
      "description": "Combines two or more configuration options together in a single expect call, such as {showMatcherMessage: false, showStack: false} or {showPrefix: false, showMatcherMessage: false}.",
      "max_score": 20
    },
    {
      "name": "Configuration variety",
      "description": "Demonstrates proficiency by using at least three different configuration combinations across the test suite, showing understanding of how the options work together.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

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

tile.json