From d7f3e28eed8c75e51b90647741ec882ff8cdf814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sun, 8 Sep 2019 23:20:11 +0200 Subject: [PATCH] reenable test getMatchingUrlsLocal (denoland/deno_std#589) Original: https://github.com/denoland/deno_std/commit/cfb0eb55ab83767532b818db4cabab03d157d18e --- testing/runner_test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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); }); -*/