diff --git a/bids-validator/src/files/browser.test.ts b/bids-validator/src/files/browser.test.ts index 4e1529ee6..3bc406e31 100644 --- a/bids-validator/src/files/browser.test.ts +++ b/bids-validator/src/files/browser.test.ts @@ -1,5 +1,6 @@ import { FileIgnoreRules } from './ignore.ts' import { FileTree } from '../types/filetree.ts' +import { join } from '../deps/path.ts' import { assertEquals, assertObjectMatch } from '../deps/asserts.ts' import { BIDSFileBrowser, fileListToTree } from './browser.ts' @@ -59,7 +60,7 @@ Deno.test('Browser implementation of FileTree', async (t) => { const tree = await fileListToTree(files) const expectedTree = new FileTree('', '/', undefined) const sub01Tree = new FileTree('sub-01', 'sub-01', expectedTree) - const anatTree = new FileTree('sub-01/anat', 'anat', sub01Tree) + const anatTree = new FileTree(join('sub-01', 'anat'), 'anat', sub01Tree) expectedTree.files = files .slice(0, 3) .map((f) => new BIDSFileBrowser(f, ignore)) @@ -86,4 +87,4 @@ Deno.test("Spread copies of BIDSFileBrowser contain name and path properties", a assertEquals(tree, expectedTree) const spreadFile = {...expectedTree.files[0], evidence: "test evidence"} assertObjectMatch(spreadFile, {name: "dataset_description.json", path: "/dataset_description.json", evidence: "test evidence"}) -}) \ No newline at end of file +})