Skip to content

test: add unit tests for URL/path canonicalization utilities #3

Description

@tanmayjoddar

Why

Canonicalization is used to merge schemas across variable IDs (e.g., /users/123 and /users/456). Current behavior is untested.

Where

  • src/utils/canonicalize.js
  • Add: tests/utils/canonicalize.test.js

Acceptance Criteria

  • canonicalizePathname() replaces numeric segments with :id
  • UUID segments become :uuid
  • High-entropy segments become :id
  • Root path stays /
  • normalizeUrl() removes query/hash and canonicalizes pathname
  • npm test passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper experiencegood first issueGood for first-time contributorsgssocGSSoC

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions