update rule tests

This commit is contained in:
fzzinchemical
2025-04-02 16:27:10 +02:00
parent 8f903af37d
commit 5f44313c3d
2 changed files with 15 additions and 44 deletions

View File

@@ -87,7 +87,6 @@ export function requestParser(requestString: string) {
} else {
throw Error("Request String had some major issues chief");
}
console.debug();
return map;
}
@@ -99,30 +98,5 @@ export function generateRequestURL(requestString: string) {
for (const [k, v] of requestParser(requestString)) {
postCpy.searchParams.append(k, v);
}
console.debug(postCpy.searchParams.toString());
console.debug({ postCpy });
return postCpy.href.toString().replaceAll("%2B", "+");
}
Deno.test("Test Request Parser", () => {
assert(
requestParser("[limit: 12,tags:bro+likes+bread]"),
'{ "limit" => "12", "tags" => "bro+likes+bread" }',
);
});
Deno.test("Test URL Search Parameters", () => {
console.debug(generateRequestURL("[limit:3]"));
});
Deno.test("Test Drop", async () => {
console.debug(await drop());
});
Deno.test("Test Request Workder", async () => {
console.debug(await requestWorker("[limit: 12,tags:sfw]"));
});
Deno.test("Test Request Workder 2", async () => {
console.debug(await requestWorker("[limit: 5,tags: AI+catgirl]"));
});
}