Summary: Added new package with test utilities re-used by other packages Reviewed By: mweststrate Differential Revision: D21949629 fbshipit-source-id: 8bfa959401669dc8911a1f647f417cafd92c2e4b
17 lines
400 B
TypeScript
17 lines
400 B
TypeScript
/**
|
|
* 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;
|
|
}
|