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"); }); });