debugging donotrun

This commit is contained in:
zkldi
2021-04-20 16:30:00 +01:00
parent edd7aeb73a
commit 760952bcf2
4 changed files with 19 additions and 9 deletions
+9 -3
View File
@@ -1,11 +1,13 @@
import tap from "tap";
import t from "tap";
import { rootLogger } from "../logger";
import { CloseAllConnections } from "./close-connections";
import mockApi from "./mock-api";
type TestCB = Exclude<Parameters<typeof tap.test>[1], undefined>;
type TestCB = Exclude<Parameters<typeof t.test>[1], undefined>;
type Test = Parameters<TestCB>[0];
export function RequireNeutralAuthentication(t: Test, url: string, method: "GET" | "POST" = "GET") {
export function RequireNeutralAuthentication(url: string, method: "GET" | "POST" = "GET") {
t.test(`Testing authentication for ${method} ${url}.`, async (t) => {
let res;
@@ -21,5 +23,9 @@ export function RequireNeutralAuthentication(t: Test, url: string, method: "GET"
"You are not authorised to perform this action.",
"Should return an appropriate error message."
);
// CloseAllConnections();
t.end();
});
}