Files
react-native-community-cli/__e2e__/default.test.ts
Antón MolledaandMichał Pierzchała 5819a17d14 chore: make cleanup async (#1156)
* chore: make `cleanup` async

Using `rimraf.sync` can cause `ENOTEMPTY` and `EBUSY` errors on Windows.
This can make the Windows CI to fail randomly. Changing to the async
method defaults to autoretry 3 times and thus avoiding this issues.

* chore: jest config

* chore: e2e tests use sync cleanup

* chore: pr feedback

* chore: revert timeout

* Update __e2e__/default.test.ts

* Update __e2e__/default.test.ts

Co-authored-by: Michał Pierzchała <[email protected]>
2020-05-12 15:53:04 +02:00

22 lines
402 B
TypeScript

import {
runCLI,
getTempDirectory,
cleanupSync,
writeFiles,
} from '../jest/helpers';
const DIR = getTempDirectory('test_default_behavior');
beforeEach(() => {
cleanupSync(DIR);
writeFiles(DIR, {});
});
afterEach(() => {
cleanupSync(DIR);
});
test('shows up help information without passing in any args', () => {
const {stdout} = runCLI(DIR);
expect(stdout).toMatchSnapshot();
});