Skip to content

Commit

Permalink
Fix hashed folder copy test on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
iclanton committed Jan 25, 2024
1 parent a746d32 commit 357ce3b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

jest.mock('node:path', () => {
const path: typeof import('path') = jest.requireActual('path');
return path.posix;
});

jest.mock(
'fast-glob/out/providers/provider',
() => {
const path: typeof import('path') = require('path');
const path: typeof import('path') = jest.requireActual('path');
const { default: provider } = jest.requireActual('fast-glob/out/providers/provider');
provider.prototype._getRootDirectory = function (task: { base: string }) {
// fast-glob calls `path.resolve` which doesn't work correctly with the MemFS volume while running on Windows
Expand Down

0 comments on commit 357ce3b

Please sign in to comment.