normalize root to work on windows
Signed-off-by: Juan Pablo Garcia Ripa <juanpablog@spotify.com>
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
|
||||
import mockFs from 'mock-fs';
|
||||
import { resolve as resolvePath, join as joinPath } from 'path';
|
||||
import { resolve as resolvePath, join as joinPath, normalize } from 'path';
|
||||
import { resolvePackagePath, paths, findPackageDirs } from './paths';
|
||||
|
||||
describe('paths', () => {
|
||||
jest.spyOn(paths, 'targetRoot', 'get').mockReturnValue('/root');
|
||||
jest.spyOn(paths, 'targetRoot', 'get').mockReturnValue(normalize('/root'));
|
||||
jest.spyOn(paths, 'resolveTargetRoot').mockImplementation((...path) => {
|
||||
return resolvePath('/root', ...path);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user