Repository navigation
Commit 6680d28
fix(@schematics/angular): migrate spy.calls.first().args in refactor-jasmine-vitest
`spy.calls.first()` is migrated to `vi.mocked(spy).mock.calls[0]`, which is alredy arguments array of first call, but `.args` after it was kept
so `spy.calls.first().args[0]` became `vi.mocked(spy).mock.calls[0].args[0]`, which fails with TS2339 and throws at runtime
`.args` after `first()` is now dropped same way as after `mostRecent()` and `all()[i]`
(cherry picked from commit d3acc84)1 parent dd18bda commit 6680d28
2 files changed
Lines changed: 23 additions & 2 deletions
File tree
- packages/schematics/angular/refactor/jasmine-vitest/transformers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
546 | 557 | | |
547 | 558 | | |
548 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
325 | 335 | | |
326 | 336 | | |
327 | 337 | | |
| |||
0 commit comments