Skip to content

Commit 220e8dd

Browse files
committed
fix windows test
1 parent 9a3680a commit 220e8dd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/vscode/tests/suite/helpers.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import assert from 'node:assert';
2+
import path from 'node:path';
23
import type * as vscode from 'vscode';
34

45
export async function delay(ms: number) {
@@ -84,11 +85,9 @@ export function toLabelTree(
8485
const nodes: { label: string; children?: any[] }[] = [];
8586
collection.forEach((child) => {
8687
const children = toLabelTree(child.children, maxDepth - 1);
87-
nodes.push(
88-
children.length
89-
? { label: child.label, children }
90-
: { label: child.label },
91-
);
88+
// normalize to linux path style
89+
const label = child.label.replaceAll(path.sep, '/');
90+
nodes.push(children.length ? { label, children } : { label });
9291
});
9392
nodes.sort((a, b) => (a.label < b.label ? -1 : a.label > b.label ? 1 : 0));
9493
return nodes;

0 commit comments

Comments
 (0)