Three test files added in #2802, #2816 and #2817 build partial mock objects with } as any and an // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion above each:
| file |
hatches |
packages/app/src/components/__tests__/MetricTableModelForm.test.tsx |
4 |
packages/app/src/components/__tests__/DBTimeChart.test.tsx |
2 |
packages/app/src/components/__tests__/DBRowSidePanel.viewTraceTimeFilter.test.tsx |
1 |
These are the case @total-typescript/shoehorn is for: fromPartial({...}) gives the same brevity while still type-checking the fields you do set, so a renamed or retyped field breaks the test instead of sailing through the assertion.
Swapping them lets the ratchet baseline in scripts/ci/ratchet-baseline.json come back down (app/as-any 215 → 208, app/eslint-disable 143 → 136) via yarn ratchet:update.
Noticed while re-baselining the ratchet in #2661.
Three test files added in #2802, #2816 and #2817 build partial mock objects with
} as anyand an// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertionabove each:packages/app/src/components/__tests__/MetricTableModelForm.test.tsxpackages/app/src/components/__tests__/DBTimeChart.test.tsxpackages/app/src/components/__tests__/DBRowSidePanel.viewTraceTimeFilter.test.tsxThese are the case
@total-typescript/shoehornis for:fromPartial({...})gives the same brevity while still type-checking the fields you do set, so a renamed or retyped field breaks the test instead of sailing through the assertion.Swapping them lets the ratchet baseline in
scripts/ci/ratchet-baseline.jsoncome back down (app/as-any215 → 208,app/eslint-disable143 → 136) viayarn ratchet:update.Noticed while re-baselining the ratchet in #2661.