From ed6feaf9f887e50f65c59074062d3e2f6d7da0d0 Mon Sep 17 00:00:00 2001 From: Stuart Rackham Date: Thu, 21 May 2020 11:11:45 +1200 Subject: [PATCH] fix: test: Windows: Because `Deno.realPath` returns `/` separators on Windows. --- tests/registry_test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/registry_test.ts b/tests/registry_test.ts index 1c3712b..eb85633 100644 --- a/tests/registry_test.ts +++ b/tests/registry_test.ts @@ -1,7 +1,13 @@ import { env } from "../lib/env.ts"; import { desc, run, task } from "../lib/registry.ts"; import { DrakeError, writeFile } from "../lib/utils.ts"; -import { assert, assertEquals, assertThrowsAsync, existsSync } from "./deps.ts"; +import { + assert, + assertEquals, + assertThrowsAsync, + existsSync, + path, +} from "./deps.ts"; env("--quiet", true); Deno.test("registryTest", async function () { @@ -12,7 +18,7 @@ Deno.test("registryTest", async function () { env("--directory", "."); assertEquals( - env("--directory"), + env("--directory").replace(/\//g, path.SEP), dir, "--directory path should be absolute", );