Repository navigation
Commit 4cb7bb5
fix(@schematics/angular): add a TODO for negated arrayWithExactContents in refactor-jasmine-vitest
`transformArrayWithExactContents` splits the assertion into a
`.toHaveLength()` check and a `.toEqual(expect.arrayContaining())`
check without looking for `.not`. A negated assertion is split into two
negated checks, which asserts that neither condition holds instead of
not both: an array with the right length but different contents passes
in Jasmine and fails after the migration.
Vitest has no single matcher for exact-contents-in-any-order, so a
faithful negation cannot be expressed by splitting. Leave the negated
form unchanged and add a TODO comment instead, matching the existing
handling of a dynamic (non-literal) argument.
The new spec runs the full transform pipeline on a negated assertion;
it fails without this change and `//packages/schematics/angular:test`
passes with it.1 parent 5d837b5 commit 4cb7bb5
3 files changed
Lines changed: 27 additions & 1 deletion
File tree
- packages/schematics/angular/refactor/jasmine-vitest
- transformers
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
416 | 427 | | |
417 | 428 | | |
418 | 429 | | |
| |||
427 | 438 | | |
428 | 439 | | |
429 | 440 | | |
430 | | - | |
431 | 441 | | |
432 | 442 | | |
433 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
259 | 269 | | |
260 | 270 | | |
261 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
0 commit comments