Repository navigation
Commit 3b0ed89
committed
test(webview): pin the name the rename guard asks about, and the steps a rejected rename skips
The collision case stubbed hasConfig to answer true for every name, so a guard aimed
at oldName satisfied it, and nothing in it said whether a rejected rename still moved
user-visible state. The case now asserts the argument the existence check was called
with, and that neither the view re-point nor the profile activation ran.
Measured by mutating the handler rather than by asserting intent: pointing the guard at
oldName leaves every pre-existing assertion in the case green and fails only the new
argument assertion (expected "vi.fn()" to be called with arguments: [ 'foo' ], received
[ 'Foo' ]); re-pointing live views before the rejection fails only the new re-point
assertion. Both mutants were reverted and the handler blob verifies back to df7f0c0.
Test-only change: no behaviour in the handler or the provider moved. webviewMessageHandler
spec: 179 passed (179).
Counts from git diff --cached --numstat in this same run: 15 added, 3 deleted in 1 file (core/webview/__tests__/webviewMessageHandler.spec.ts).1 parent 628b913 commit 3b0ed89
1 file changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3162 | 3162 | | |
3163 | 3163 | | |
3164 | 3164 | | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
3165 | 3168 | | |
3166 | 3169 | | |
3167 | | - | |
| 3170 | + | |
3168 | 3171 | | |
3169 | 3172 | | |
3170 | 3173 | | |
3171 | 3174 | | |
3172 | | - | |
3173 | | - | |
| 3175 | + | |
| 3176 | + | |
3174 | 3177 | | |
3175 | 3178 | | |
3176 | 3179 | | |
| |||
3182 | 3185 | | |
3183 | 3186 | | |
3184 | 3187 | | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
3185 | 3192 | | |
3186 | 3193 | | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
3187 | 3199 | | |
3188 | 3200 | | |
3189 | 3201 | | |
| |||
0 commit comments