Skip to content

Commit

Permalink
added unit test for programmatic exclude-match header generation for …
Browse files Browse the repository at this point in the history
…Violentmonkey
  • Loading branch information
Oaphi committed May 15, 2022
1 parent 951222c commit b4235c0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/violent.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down Expand Up @@ -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]
});

Expand Down

0 comments on commit b4235c0

Please # to comment.