diff --git a/tests/testcafe/404.test.ts b/tests/testcafe/404.test.ts index 8cd5ef7..8f3853e 100644 --- a/tests/testcafe/404.test.ts +++ b/tests/testcafe/404.test.ts @@ -2,7 +2,7 @@ import { Selector } from "testcafe"; import { getSiteRoot } from "./utils"; -fixture`404 page renders and functions correctly`.page(`${getSiteRoot}/404`); +fixture`404 page renders and functions correctly`.page(`${getSiteRoot()}/404`); test("Page contains the text 404", async t => { /** diff --git a/tests/testcafe/admin/login.test.ts b/tests/testcafe/admin/login.test.ts index 9d875dd..c6237b6 100644 --- a/tests/testcafe/admin/login.test.ts +++ b/tests/testcafe/admin/login.test.ts @@ -2,7 +2,7 @@ import { Selector, ClientFunction } from "testcafe"; import { getSiteRoot } from "../utils"; import { doLogin } from "./common/login"; -fixture`Admin login page functions correctly`.page(`${getSiteRoot}/admin/login`); +fixture`Admin login page functions correctly`.page(`${getSiteRoot()}/admin/login`); test("Login form exists", async t => { /** diff --git a/tests/testcafe/index.test.ts b/tests/testcafe/index.test.ts index 8ce72c9..994c4ce 100644 --- a/tests/testcafe/index.test.ts +++ b/tests/testcafe/index.test.ts @@ -1,7 +1,7 @@ import { Selector } from "testcafe"; import { getSiteRoot } from "./utils"; -fixture`Front page renders and functions correctly`.page(`${getSiteRoot}`); +fixture`Front page renders and functions correctly`.page(`${getSiteRoot()}`); test("Favicon exists", async t => { /** diff --git a/tests/testcafe/utils.ts b/tests/testcafe/utils.ts index da4d989..78335df 100644 --- a/tests/testcafe/utils.ts +++ b/tests/testcafe/utils.ts @@ -1,3 +1 @@ -export const getSiteRoot = () => { - return process.env.SITE_URL || "http://localhost:3000"; -} \ No newline at end of file +export const getSiteRoot = (): string => process.env.SITE_URL || "http://localhost:3000"; \ No newline at end of file