Skip to content

Commit

Permalink
correct regex to match only window path
Browse files Browse the repository at this point in the history
  • Loading branch information
CordlessWool committed Nov 12, 2024
1 parent 4604573 commit 83cdfa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/interface-tests/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export const TestAdapter = (
expect(dirent.isFile()).toBe(true);
expect(dirent.isDirectory()).toBe(false);
expect(dirent.name).toBe(fileName);
const pathRef = path.match(/^([A-Za-z]:)?[\\/]/) ? path.slice(2) : path;
const pathRef = path.match(/^([A-Za-z]{1}:)[\\/]/) ? path.slice(2) : path;
expect(dirent.path).toBe(pathRef.startsWith(sep) ? pathRef : normalize(`/${pathRef}`));
});

Expand Down

0 comments on commit 83cdfa2

Please sign in to comment.