diff --git a/testing/runner_test.ts b/testing/runner_test.ts index 0352e3c5bf..0e2289187b 100644 --- a/testing/runner_test.ts +++ b/testing/runner_test.ts @@ -2,9 +2,13 @@ import { test } from "./mod.ts"; import { assertEquals } from "../testing/asserts.ts"; import { getMatchingUrls } from "./runner.ts"; +import { join } from "../fs/path/mod.ts"; -const fileName = window.location.href; -const TEST_ROOT_PATH = fileName.slice(7, fileName.indexOf("testing")) + "fmt"; +/** + * IMPORTANT: This file assumes it is run from root of repository. + */ +const cwd = Deno.cwd(); +const TEST_ROOT_PATH = join(cwd, "fmt"); test(async function getMatchingUrlsRemote(): Promise { const matches = [ @@ -16,7 +20,6 @@ test(async function getMatchingUrlsRemote(): Promise { assertEquals(urls, matches); }); -/* TODO re-enable test test(async function getMatchingUrlsLocal(): Promise { const urls = await getMatchingUrls( ["fmt/*_test.ts"], @@ -25,4 +28,3 @@ test(async function getMatchingUrlsLocal(): Promise { ); assertEquals(urls.length, 1); }); -*/