From e7c5becb64fcbbb8abb6a3e5a6f0aabcae15d840 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sat, 8 Jun 2024 16:41:44 -0400 Subject: [PATCH] fix(test): Use fromFileURL to parse file path [win] --- bids-validator/src/files/deno.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bids-validator/src/files/deno.test.ts b/bids-validator/src/files/deno.test.ts index 1b37aa4ef..854339edc 100644 --- a/bids-validator/src/files/deno.test.ts +++ b/bids-validator/src/files/deno.test.ts @@ -1,6 +1,6 @@ import { assertEquals, assertRejects } from '../deps/asserts.ts' import { readAll, readerFromStreamReader } from '../deps/stream.ts' -import { dirname, basename, join } from '../deps/path.ts' +import { dirname, basename, join, fromFileUrl } from '../deps/path.ts' import { BIDSFileDeno, UnicodeDecodeError } from './deno.ts' import { requestReadPermission } from '../setup/requestPermissions.ts' import { FileIgnoreRules } from './ignore.ts' @@ -9,7 +9,7 @@ await requestReadPermission() // Use this file for testing file behavior const testUrl = import.meta.url -const testPath = testUrl.slice('file://'.length) +const testPath = fromFileUrl(testUrl) const testDir = dirname(testPath) const testFilename = basename(testPath) const ignore = new FileIgnoreRules([])