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:
Anton Nikolaev
2020-06-09 04:52:39 -07:00
committed by Facebook GitHub Bot
parent eeded4e32f
commit d27fa34505
15 changed files with 106 additions and 19 deletions

View File

@@ -10,6 +10,7 @@
import fse from 'fs-extra';
import {initTemplate} from '../commands/init';
import {normalizePath} from 'flipper-test-utils';
let files: Record<string, string> = {};
@@ -18,7 +19,7 @@ beforeEach(() => {
// no implementation
}
function writeFile(name: string, contents: string) {
files[name.replace(/\\/g, '/')] = contents;
files[normalizePath(name)] = contents;
}
files = {};