mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-08 00:40:52 +08:00
17 lines
512 B
JavaScript
17 lines
512 B
JavaScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { expectWidgetConfigShape } from "test-utils/widget-config";
|
|
|
|
import widget from "./widget";
|
|
|
|
describe("bazarr widget config", () => {
|
|
it("exports a valid widget config", () => {
|
|
expectWidgetConfigShape(widget);
|
|
expect(widget.api).toContain("apikey={key}");
|
|
|
|
const moviesMapping = widget.mappings?.movies;
|
|
expect(moviesMapping?.endpoint).toBe("movies");
|
|
expect(moviesMapping?.map?.('{"total":123}')).toEqual({ total: 123 });
|
|
});
|
|
});
|