Skip to content

Commit

Permalink
[cli] Disable color in tests (#16102)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon committed Jan 28, 2022
1 parent d74f18b commit 355cd72
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
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(`
"
[1mDescription[22m
Description
Show the project config
[1mUsage[22m
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(`
"
[1mUsage[22m
[1m$[22m npx expo <command>
Usage
$ npx expo <command>
[1mAvailable commands[22m
Available commands
config, prebuild
[1mOptions[22m
Options
--version, -v Version number
--help, -h Displays this message
For more information run a command with the --help flag
[1m$[22m 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(`
"
[1mDescription[22m
Description
Create native iOS and Android project files before building natively.
[1mUsage[22m
Usage
$ npx expo prebuild <dir>
<dir> is the directory of the Expo project.
Expand Down

0 comments on commit 355cd72

Please sign in to comment.