Ctrl + K
DocumentationLog inGet started

tessl/npm-jest-circus

tessl install tessl/npm-jest-circus@29.7.0

The next-gen flux-based test runner for Jest that provides test framework globals and event-driven test execution

Agent Success

Agent success rate when using this tile

82%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.91x

Baseline

Agent success rate without this tile

43%

task.mdevals/scenario-5/

Custom Matchers for Range Validation

Build a custom Jest matcher library that provides intuitive assertions for testing numeric ranges and boundary conditions.

Capabilities

Range validation matcher

Provides a matcher to check if a number falls within a specified range (inclusive).

  • Given the number 5, checking if it's in range [1, 10] returns true @test
  • Given the number 0, checking if it's in range [1, 10] returns false @test
  • Given the number 10, checking if it's in range [1, 10] returns true (inclusive upper bound) @test

Matcher provides helpful error messages

The custom matcher should provide clear, descriptive error messages when assertions fail.

  • When a value is outside the expected range, the error message includes the received value and the expected range @test

Implementation

@generates

API

/**
 * Extends Jest's expect with custom matchers for range validation.
 * Must be called before using the custom matchers in tests.
 */
function setupCustomMatchers() {
  // Implementation registers custom matcher(s) with expect
}

module.exports = { setupCustomMatchers };

Dependencies { .dependencies }

jest { .dependency }

Provides the testing framework and expect.extend functionality for creating custom matchers.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/jest-circus@29.7.x
tile.json