Repository navigation
Commit d71db6a
committed
test(editor): pin the rollback range, target uri and the touched-document close decision
Two review rows on #1932 read against head 5bc7709:
- DiffViewProvider.spec.ts:3165 (Minor, Functional Correctness): makeRollbackDocument
answered positionAt(0) and positionAt(len) with the same (0,0), so an empty or reversed
range and a wrong target uri both passed while mocked applyEdit reported success. The
fixture now answers per offset and the two new-file rollback tests assert the document
uri plus both offsets the replacement range is built from.
- DiffViewProvider.spec.ts:3378 (Minor, Functional Correctness): the modify rollback only
exercised the untouched-document branch, where autoCloseZooOpenedFilesAfterUserEdited
and autoCloseZooOpenedNewFiles cannot move the close decision. Added the touched-
document case with the three settings set to distinct values: after-user-edited off
keeps the tab and re-shows the file rather than closing it.
Gates run in this worktree against this commit:
- pnpm --dir src exec vitest run integrations/editor/__tests__/DiffViewProvider.spec.ts
-> 1 test file passed, 131 tests passed.
- pnpm --dir src exec eslint --max-warnings=0 integrations/editor/__tests__/DiffViewProvider.spec.ts -> clean.
- pnpm --dir src exec prettier --write/--check on the same file -> clean.
- src/eslint-suppressions.json untouched (no suppression entry could grow: eslint reported
0 problems for the file).
Not run here: knip, compile, e2e-mock, platform-unit-test matrices, mutation-diff, codecov.
No mutant was executed against this suite locally by this lane.1 parent 5bc7709 commit d71db6a
1 file changed
Lines changed: 54 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3162 | 3162 | | |
3163 | 3163 | | |
3164 | 3164 | | |
3165 | | - | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
3166 | 3170 | | |
3167 | 3171 | | |
3168 | 3172 | | |
| |||
3220 | 3224 | | |
3221 | 3225 | | |
3222 | 3226 | | |
3223 | | - | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
3224 | 3233 | | |
3225 | 3234 | | |
3226 | 3235 | | |
| |||
3238 | 3247 | | |
3239 | 3248 | | |
3240 | 3249 | | |
3241 | | - | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
3242 | 3256 | | |
3243 | 3257 | | |
3244 | 3258 | | |
| |||
3396 | 3410 | | |
3397 | 3411 | | |
3398 | 3412 | | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
3399 | 3450 | | |
3400 | 3451 | | |
3401 | 3452 | | |
| |||
0 commit comments