tessl install tessl/npm-jest-circus@29.7.0The 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%
Write a comprehensive test suite that validates different equality comparison scenarios for configuration objects. Your tests should demonstrate understanding of when to use different types of equality checks.
A configuration management system needs to validate user settings. Different scenarios require different types of equality checks: some need to verify reference identity, others need deep value comparison, and some need strict type checking.
Implement three simple comparison functions in src/compare.js:
isSameReference(a, b) - Returns true if both arguments reference the exact same valueisDeepEqual(a, b) - Returns true if values have the same structure and contentisStrictEqual(a, b) - Returns true if values are equal with strict type checkingThese functions can use built-in JavaScript comparison (you don't need to implement custom deep equality logic).
Create a comprehensive test suite in src/compare.test.js that tests these comparison functions with various inputs. Your test suite should cover:
Test Case 1: Primitive Values { .test }
42 with number 42Test Case 2: Same Object Reference { .test }
const obj = {name: "test"}; compare obj with itselfTest Case 3: Different Object References { .test }
{id: 1, name: "user"} with a new object {id: 1, name: "user"}Test Case 4: Sparse vs Dense Arrays { .test }
[1, , 3] (sparse) with [1, undefined, 3] (dense)Provides testing framework and assertion matchers for validating the configuration validator behavior.