Skip to content

Test required-copy matching in proof #6

Open

Description

@adityareddy-dev

checkCopy in proof/check.mjs normalizes case, whitespace and quotes before checking required text, but that behavior has no direct unit test.

Add unit tests under proof/test/ for a phrase split across two rendered text boxes, different capitalization, line breaks, straight and curly apostrophes, and a genuinely missing phrase. An empty required-copy list should return no failures. The missing phrase should produce a copy failure that identifies the text.

Use synthetic DOM boxes and call checkCopy directly. Keep this to the existing matching rules, with no browser or model call. Run the new test file with node --test, then npm test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions