test: add widget config tests (batch 1)

This commit is contained in:
shamoon
2026-02-04 09:39:43 -08:00
parent 4c3d39709b
commit d29854f710
11 changed files with 168 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";
import { expectWidgetConfigShape } from "test-utils/widget-config";
import widget from "./widget";
describe("apcups widget config", () => {
it("exports a valid widget config", () => {
expectWidgetConfigShape(widget);
// apcups talks TCP directly, so it does not use an `{url}/...` API template.
expect(widget.api).toBeUndefined();
});
});