Added module for test-utilities used across all packages
Summary: Added new package with test utilities re-used by other packages Reviewed By: mweststrate Differential Revision: D21949629 fbshipit-source-id: 8bfa959401669dc8911a1f647f417cafd92c2e4b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eeded4e32f
commit
d27fa34505
16
desktop/test-utils/src/pathUtils.ts
Normal file
16
desktop/test-utils/src/pathUtils.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export function normalizePath(path: string): string {
|
||||
if (process.platform === 'win32') {
|
||||
path = path.replace(/\\/g, '/');
|
||||
path = path.substring(path.indexOf('/'));
|
||||
}
|
||||
return path;
|
||||
}
|
||||
Reference in New Issue
Block a user