Added 1B, 2 and added bootstrap again for site
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user