diff options
Diffstat (limited to 'std/hash/sha256_test.ts')
-rw-r--r-- | std/hash/sha256_test.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/std/hash/sha256_test.ts b/std/hash/sha256_test.ts index ba7efe4d1..fd9c227f4 100644 --- a/std/hash/sha256_test.ts +++ b/std/hash/sha256_test.ts @@ -1,9 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { Sha256, HmacSha256, Message } from "./sha256.ts"; import { assertEquals } from "../testing/asserts.ts"; -import { join, resolve } from "../path/mod.ts"; +import { dirname, join, resolve, fromFileUrl } from "../path/mod.ts"; -const testdataDir = resolve("hash", "testdata"); +const moduleDir = dirname(fromFileUrl(import.meta.url)); +const testdataDir = resolve(moduleDir, "testdata"); /** Handy function to convert an array/array buffer to a string of hex values. */ function toHexString(value: number[] | ArrayBuffer): string { |