mirror of
https://github.com/expo/react-native-community-cli.git
synced 2026-11-15 09:18:35 -10:00
* Moved disabling logger at the top when user used config command * Added e2e tests for config command * Added config command output snapshot * Updated config test snapshot * Added project root replacement helper * Removed default terminal program from snapshots * Moved tests to jest folder and removed additional snapshot * less snapshots; use raw serializer * strip unnecessary parts of the snapshot * Added tmp directory to regex which replaces project root before snapshot * Added slash before passing testFolder for project root replacing helper * Fixed problem with windows paths replacing * CR fixes Co-authored-by: Michał Pierzchała <[email protected]>
15 lines
488 B
TypeScript
15 lines
488 B
TypeScript
import {replaceProjectRootInOutput} from '../helpers';
|
|
|
|
test('should replace project root in output with <<REPLACED_ROOT>> value', () => {
|
|
const cwd = '/var/folders/zt/917v0jxx6lg3p_zfh9s_02bm0000gn/T/';
|
|
const output = `{
|
|
"root": "/private${cwd}/test_root/TestProject",
|
|
}`;
|
|
const outputWithReplacedProjectRoot = `{
|
|
"root": "<<REPLACED_ROOT>>/test_root/TestProject",
|
|
}`;
|
|
expect(replaceProjectRootInOutput(output, cwd)).toBe(
|
|
outputWithReplacedProjectRoot,
|
|
);
|
|
});
|