Skip to content

Commit

Permalink
toDisplayRedbox(): replace all occurrences of testDir (#76618)
Browse files Browse the repository at this point in the history
Currently we only replace the first occurrence with
`String.prototype.replace()`. This uses `replaceAll` to replace all
occurrences.
    
Test Plan: See next PR in this stack for use.
  • Loading branch information
wbinnssmith authored Mar 3, 2025
1 parent 514e9b3 commit bd39335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/lib/add-redbox-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function createRedboxSnapshot(
focusedSource = focusedSource.trim()

if (next !== null) {
focusedSource = focusedSource.replace(
focusedSource = focusedSource.replaceAll(
next.testDir,
'<FIXME-project-root>'
)
Expand Down

0 comments on commit bd39335

Please sign in to comment.