Add protection domain foundation
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { describe, it } from "node:test";
|
||||
import {
|
||||
defaultMainSwitchComponent,
|
||||
defaultSurgeProtectiveDeviceComponent,
|
||||
distributionBoardComponentPlacements,
|
||||
distributionBoardComponentRoles,
|
||||
} from "../src/shared/constants/distribution-board-component.js";
|
||||
import { circuitGroupCategories } from "../src/shared/constants/circuit-group.js";
|
||||
|
||||
describe("distribution board component catalog", () => {
|
||||
it("defines the agreed component roles and placement zones", () => {
|
||||
assert.deepEqual(distributionBoardComponentRoles, [
|
||||
"main_switch",
|
||||
"surge_protective_device",
|
||||
"group_upstream_protection",
|
||||
"group_residual_current_protection",
|
||||
"auxiliary",
|
||||
]);
|
||||
assert.deepEqual(distributionBoardComponentPlacements, [
|
||||
"header",
|
||||
"group",
|
||||
"footer",
|
||||
]);
|
||||
});
|
||||
|
||||
it("defines exactly the three supported circuit group categories", () => {
|
||||
assert.deepEqual(circuitGroupCategories, [
|
||||
"lighting",
|
||||
"single_phase",
|
||||
"three_phase",
|
||||
]);
|
||||
});
|
||||
|
||||
it("provides the fixed header component defaults", () => {
|
||||
assert.deepEqual(defaultMainSwitchComponent, {
|
||||
equipmentIdentifier: "-Q0",
|
||||
name: "Hauptschalter",
|
||||
role: "main_switch",
|
||||
placement: "header",
|
||||
});
|
||||
assert.deepEqual(defaultSurgeProtectiveDeviceComponent, {
|
||||
equipmentIdentifier: "-FA",
|
||||
name: "Überspannungsableiter",
|
||||
role: "surge_protective_device",
|
||||
placement: "header",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user