2026-04-21 17:10:06 +08:00

21 lines
675 B
TypeScript

import { describe, expect, test } from "vitest";
import manifest from "../src/manifest.json";
describe("manifest", () => {
test("injects the content script on the www Xingtu market page", () => {
expect(manifest.content_scripts?.[0]?.matches).toEqual(
expect.arrayContaining([
expect.stringMatching(/^https:\/\/(\*\.|www\.)?xingtu\.cn\/ad\/creator\/market\*$/)
])
);
});
test("declares the downloads permission and background worker for csv export", () => {
expect(manifest.permissions).toEqual(
expect.arrayContaining(["downloads"])
);
expect(manifest.background?.service_worker).toBe("background/index.js");
});
});