Typecheck tests against current types
tsx runs tests without type checking and tsconfig.json covers only src, so 71 type errors had accumulated unnoticed. tsconfig.tests.json now checks every test and helper, and npm run typecheck includes it. Fixtures gain the fields the DTOs have grown since they were written (manualQuantity, circuit apparent power/cos phi, downstream board loads, section totals, building, cover and board info fields). Repository lookups that return "row ?? null" now declare the null in their type, which their callers already handle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a8cc7eca5e
commit
7222398628
37 changed files with 166 additions and 56 deletions
|
|
@ -42,7 +42,10 @@ function circuit(
|
|||
sortOrder: 10,
|
||||
isReserve: true,
|
||||
circuitTotalPower: 0,
|
||||
circuitApparentPower: 0,
|
||||
circuitCosPhi: 1,
|
||||
deviceRows: [],
|
||||
downstreamBoardLoads: [],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -124,6 +127,7 @@ describe("circuit structure projection", () => {
|
|||
name: "Leuchte",
|
||||
displayName: "Leuchte",
|
||||
quantity: 1,
|
||||
manualQuantity: 1,
|
||||
powerPerUnit: 0.1,
|
||||
simultaneityFactor: 1,
|
||||
rowTotalPower: 0.1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue