fix(energy): deliver prototype-aligned hydrogen board and acceptance fixes
ci/woodpecker/push/woodpecker Pipeline was successful

Co-authored-by: HiFox Agent <agents-noreply@hifox.com>
This commit is contained in:
kfluous
2026-09-03 22:27:23 +08:00
co-authored by HiFox Agent
parent 5eb38a4b05
commit 6c91a6694a
77 changed files with 30169 additions and 361 deletions
@@ -0,0 +1,13 @@
import assert from "node:assert/strict";
import test from "node:test";
import { finiteNumber, formatNumber, formatScaled } from "./display-format";
test("能源看板格式化边界区分真实零值与不可用值", () => {
for (const value of [null, undefined, NaN, Infinity, -Infinity, "0"]) {
assert.equal(finiteNumber(value), null);
assert.equal(formatNumber(value), "—");
assert.equal(formatScaled(value, 1000), "—");
}
assert.equal(formatNumber(0), "0.00");
assert.equal(formatScaled(0, 1000), "0.00");
});