From b4235c080ffc85c0db173cbebc6c7a70aca2f1d2 Mon Sep 17 00:00:00 2001 From: Oleg Valter Date: Mon, 16 May 2022 02:10:38 +0300 Subject: [PATCH] added unit test for programmatic exclude-match header generation for Violentmonkey --- test/violent.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/violent.spec.ts b/test/violent.spec.ts index d1e9157..4dce4ae 100644 --- a/test/violent.spec.ts +++ b/test/violent.spec.ts @@ -6,7 +6,7 @@ import type { ViolentmonkeyGrantOptions, ViolentmonkeyHeaders } from "../src/generators/violentmonkey/types.js"; -import { common, grantOptionsVM, grantsVM, output, requires } from "./index.spec.js"; +import { allMatches, common, grantOptionsVM, grantsVM, output, requires } from "./index.spec.js"; describe("ViolentMonkey", async () => { const artefacts: string[] = []; @@ -47,11 +47,19 @@ describe("ViolentMonkey", async () => { const vmSpecificHeaders: Exclude< keyof ViolentmonkeyHeaders, keyof CommonHeaders - >[] = ["homepageURL", "inject-into", "run-at", "supportURL", "downloadURL"]; + >[] = [ + "exclude-match", + "homepageURL", + "inject-into", + "run-at", + "supportURL", + "downloadURL" + ]; const content = await generate("violentmonkey", { ...directCommon, downloadURL: requires[1], + excludes: allMatches.slice(0, -1), homepage: requires[1] });