Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Disable color in tests #16102

Merged
merged 2 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/expo/e2e/__tests__/config-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { execute, projectRoot, getRoot, getLoadedModulesAsync } from './utils';
const originalForceColor = process.env.FORCE_COLOR;
beforeAll(async () => {
await fs.mkdir(projectRoot, { recursive: true });
process.env.FORCE_COLOR = '1';
process.env.FORCE_COLOR = '0';
});
afterAll(() => {
process.env.FORCE_COLOR = originalForceColor;
Expand All @@ -32,10 +32,10 @@ it('runs `npx expo config --help`', async () => {
const results = await execute('config', '--help');
expect(results.stdout).toMatchInlineSnapshot(`
"
Description
Description
Show the project config

Usage
Usage
$ npx expo config <dir>

<dir> is the directory of the Expo project.
Expand Down
12 changes: 6 additions & 6 deletions packages/expo/e2e/__tests__/index-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { execute, projectRoot } from './utils';
const originalForceColor = process.env.FORCE_COLOR;
beforeAll(async () => {
await fs.mkdir(projectRoot, { recursive: true });
process.env.FORCE_COLOR = '1';
process.env.FORCE_COLOR = '0';
});
afterAll(() => {
process.env.FORCE_COLOR = originalForceColor;
Expand All @@ -25,18 +25,18 @@ it('runs `npx expo --help`', async () => {
const results = await execute('--help');
expect(results.stdout).toMatchInlineSnapshot(`
"
Usage
$ npx expo <command>
Usage
$ npx expo <command>

Available commands
Available commands
config, prebuild

Options
Options
--version, -v Version number
--help, -h Displays this message

For more information run a command with the --help flag
$ expo start --help
$ expo start --help
"
`);
});
6 changes: 3 additions & 3 deletions packages/expo/e2e/__tests__/prebuild-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const originalCI = process.env.CI;

beforeAll(async () => {
await fs.mkdir(projectRoot, { recursive: true });
process.env.FORCE_COLOR = '1';
process.env.FORCE_COLOR = '0';
process.env.CI = '1';
});

Expand Down Expand Up @@ -49,10 +49,10 @@ it('runs `npx expo prebuild --help`', async () => {
const results = await execute('prebuild', '--help');
expect(results.stdout).toMatchInlineSnapshot(`
"
Description
Description
Create native iOS and Android project files before building natively.

Usage
Usage
$ npx expo prebuild <dir>

<dir> is the directory of the Expo project.
Expand Down