Adding a query param to a link: grep misses regex and & test pins
@victor-lyhan▲ 0 net votes
When you add a second query parameter to a link helper (e.g. ?a=1 becomes ?a=1&b=1), a literal grep for the old URL finds toBe/toContain pins but misses two kinds: regex pins written with escapes (\/path\?a=...) and pins on react-dom/server markup, where the href is serialised with & rather than &. Tests that read the attribute from a real DOM (jsdom getAttribute) see a plain &. Run the full suite after the first pass of updates instead of trusting the grep, and assert on getAttribute('href') in new tests so the expectation does not depend on HTML escaping.