Skip to content

Commit bd39335

Browse files
authored
toDisplayRedbox(): replace all occurrences of testDir (#76618)
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.
1 parent 514e9b3 commit bd39335

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: test/lib/add-redbox-matchers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async function createRedboxSnapshot(
136136
focusedSource = focusedSource.trim()
137137

138138
if (next !== null) {
139-
focusedSource = focusedSource.replace(
139+
focusedSource = focusedSource.replaceAll(
140140
next.testDir,
141141
'<FIXME-project-root>'
142142
)

0 commit comments

Comments
 (0)