Strengthen direct-host redirect regression tests

Open Beginner friendly
#55 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, next.js
Domain
devops, testing

Research direction

Start with the direct-host redirect regression test and its current import from Next.js's compiled dependencies. Add a case for a nested path with two query parameters, including an encoded space, and use the public entry point from the declared @vercel/routing-utils development dependency. The tests should verify that both values survive the redirect; the issue also points to #43 and the site-wide audit for related behavior.

Written by the indexing model from the issue text.

Description

The independent review of #51 confirmed that direct visits redirect to the canonical site with the path and query intact. Two changes would make the local tests more durable.

  • Add a regression case for a nested path with two query parameters, including an encoded space. It should fail if a change to the redirect destination drops or rewrites either value.
  • Declare @vercel/routing-utils as a development dependency and import its public entry point in the test. The current import reaches into Next.js's private compiled dependencies.

Three other review notes describe intended behavior. Issue #43 specifies that bare /api redirects while /api/* functions remain on the compute host. The two additional Vercel aliases the reviewer identified currently require Vercel sign-in. The explicit root rule preserves the slashless canonical URL, which the existing root test checks.

The site-wide audit already checks production root and nested redirects with a query parameter.

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
1d 14h
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/cliff-watch

All issues in PolicyEngine/cliff-watch

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.