Commit f20390e
authored
fix: preserve namespace separators in Pest describe block names from locationHint (#407)
When Pest reports a test inside describe(SomeClass::class, ...), the
locationHint contains backslashes as namespace separators in the method
name (e.g. `Foo\Services\PlaylistService` → it test). The previous
.replace(/\\/g, '/') converted ALL backslashes, so the runtime ID
produced Foo/Services/PlaylistService which did not match the static
analysis ID (Foo\Services\PlaylistService), causing Test Explorer icons
to never update.
Fix: only apply the backslash-to-slash normalisation on the file path
portion (before ::), leaving the method name portion untouched.
Closes #4041 parent f4ff933 commit f20390e
2 files changed
Lines changed: 21 additions & 3 deletions
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
49 | 63 | | |
50 | 64 | | |
51 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments