From 97b0a2cafc7c32d264fb3317e8a5ddaea61978a3 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Mon, 4 Apr 2022 01:17:50 +0000 Subject: Formatting and linting fixes --- src/routes.test.ts | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'src/routes.test.ts') diff --git a/src/routes.test.ts b/src/routes.test.ts index 5d7839c..2633308 100644 --- a/src/routes.test.ts +++ b/src/routes.test.ts @@ -124,11 +124,20 @@ const TARGET_URL = "https://localhost:3000"; describe("templates", () => { describe("GET /sh", () => { it("should return the sh file containing the curl command", async () => { - await persistTemplate({ - inputFile: path.join(__dirname, "..", "public", "templates", "sh.tmpl"), - outputFile: path.join(HOST_DIR, "sh"), - context: { TARGET_URL }, - } as Template, logger); + await persistTemplate( + { + inputFile: path.join( + __dirname, + "..", + "public", + "templates", + "sh.tmpl" + ), + outputFile: path.join(HOST_DIR, "sh"), + context: { TARGET_URL }, + } as Template, + logger + ); const res = await (await request()).get("/sh").expect(200); expect(exit).not.toHaveBeenCalled(); @@ -139,17 +148,20 @@ describe("templates", () => { describe("GET /", () => { it("should return the index HTML file containing the bash command", async () => { - await persistTemplate({ - inputFile: path.join( - __dirname, - "..", - "public", - "templates", - "index.html.tmpl" - ), - outputFile: path.join(HOST_DIR, "index.html"), - context: { TARGET_URL, CURL_HTTPS: "--https " }, - } as Template, logger); + await persistTemplate( + { + inputFile: path.join( + __dirname, + "..", + "public", + "templates", + "index.html.tmpl" + ), + outputFile: path.join(HOST_DIR, "index.html"), + context: { TARGET_URL, CURL_HTTPS: "--https " }, + } as Template, + logger + ); const res = await (await request()) .get("/") -- cgit