Added 1B, 2 and added bootstrap again for site

This commit is contained in:
2026-05-03 22:04:45 +02:00
parent b8995b3a1b
commit d1ce485572
37 changed files with 1842 additions and 89 deletions
+18
View File
@@ -0,0 +1,18 @@
import assert from "node:assert/strict";
import { describe, it } from "node:test";
import {
calculateCircuitTotalPower,
calculateRowTotalPower,
} from "../src/domain/calculations/circuit-power-calculation.js";
describe("circuit power calculation", () => {
it("calculates row and circuit totals from device rows", () => {
assert.equal(calculateRowTotalPower(2, 1.5, 0.5), 1.5);
const total = calculateCircuitTotalPower([
{ quantity: 2, powerPerUnit: 1.5, simultaneityFactor: 0.5 },
{ quantity: 1, powerPerUnit: 3, simultaneityFactor: 1 },
]);
assert.equal(total, 4.5);
});
});