CodeVetter · Repo Unpack · Contributor handoff
chaijs/chai
Begin with the shared engine and the exact public interface involved in the task. Preserve chain continuation, modifier state, target changes, stack filtering, aliases, and diagnostic metadata when editing assertions. Tests and CI were inspected, not executed, so future validation must produce fresh results under explicit execution authorization. The inspected inventory is bounded, and older contribution examples should be reconciled with current scripts.
- Read lib/chai.js, Assertion, the relevant interface, and the exact core registration before changing behavior: the public styles converge on the same engine but may differ in argument normalization or equality semantics.
- Edit tracked lib source with awareness that package consumers and inspected tests import generated index.js; build refreshes that artifact, and prebuild's clean deletes it first.
- Preserve wrapper contracts: undefined results continue via a new Assertion and transferred flags, while explicit results escape the chain; stack-marker changes respect lockSsfi.
- Regression tests should account for target replacement after property, ownPropertyDescriptor, and throw, rather than assuming every chained assertion continues to inspect the initial value.
- Use globalErr when validating failure messages, error metadata, and supported stack filtering; inspect corresponding assert/expect/should tests for public-interface parity.
- Tests and CI were inspected, not executed. When authorized, use the existing Node or browser script for the affected behavior, then lint and broader checks as warranted; lint:types must be invoked separately from lint.
- Restore shared configuration, temporary prototype assertions, and event listeners in tests; existing fixtures demonstrate config restoration and prototype cleanup, but the event fixture's cleanup only removes addMethod/addProperty listeners.
- Prefer plugins for new assertions as CONTRIBUTING recommends, and verify historical command examples against package.json: the guide references make clean and chai.js, while current scripts generate index.js. Do not infer passing tests or complete coverage from this bounded inspection.