CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-stencil--core

A comprehensive web component compiler that transforms TypeScript and JSX code into standards-compliant web components with complete development toolchain.

75

1.44x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This evaluation assesses how well the engineer uses Stencil's E2E testing capabilities to spy on and verify custom events emitted by a web component. The focus is on proper usage of event testing APIs, event spying mechanisms, and verification of event details.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Component event declaration",
      "description": "Uses @Event() decorator to declare the counterChanged event with EventEmitter<number> type in the component",
      "max_score": 15
    },
    {
      "name": "Event emission implementation",
      "description": "Calls .emit() on the EventEmitter with the correct count value when the button is clicked",
      "max_score": 15
    },
    {
      "name": "E2E page creation",
      "description": "Uses newE2EPage() from @stencil/core/testing to create an E2E test page",
      "max_score": 10
    },
    {
      "name": "Event spy setup",
      "description": "Uses page.spyOnEvent() or element.spyOnEvent() to set up spies for the counterChanged event before triggering interactions",
      "max_score": 20
    },
    {
      "name": "Event emission verification",
      "description": "Verifies that events were emitted using spy methods like .toHaveReceivedEvent() or checking spy properties (called, callCount, events)",
      "max_score": 15
    },
    {
      "name": "Event detail verification",
      "description": "Verifies the event detail contains the correct count values using spy.firstEvent.detail, spy.lastEvent.detail, or .toHaveReceivedEventDetail()",
      "max_score": 15
    },
    {
      "name": "Event count verification",
      "description": "Verifies the correct number of events were emitted using spy.callCount, .toHaveReceivedEventTimes(), or spy.events.length",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-stencil--core

tile.json