Skip to content

Commit

Permalink
chore: Remove redundant stripAnsi from test (#7833)
Browse files Browse the repository at this point in the history
## Summary

It doesn't make sense to wrap a `runJust` call into `stripAnsi` since the latter works only with strings.
`runJest` returns an object so stripAnsi just passes it along.

Materials:

- Commit where the code was added in the first place: e12cab6#diff-4cf7d6c79ff377b63522b3af20e34e8eR307
- stripAnsi source code: https://github.com/chalk/strip-ansi/blob/097894423fedb6b4dca3005ad45608b893fcdcf8/index.js
  • Loading branch information
vitkarpov authored and thymikee committed Feb 8, 2019
1 parent ba4e963 commit cd77749
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions e2e/__tests__/multiProjectRunner.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import runJest from '../runJest';
import os from 'os';
import path from 'path';
import stripAnsi from 'strip-ansi';
import {cleanup, extractSummary, sortLines, writeFiles} from '../Utils';
import {wrap} from 'jest-snapshot-serializer-raw';

Expand Down Expand Up @@ -322,7 +321,7 @@ test('resolves projects and their <rootDir> properly', () => {
}),
});

({stderr} = stripAnsi(runJest(DIR, ['--no-watchman'])));
({stderr} = runJest(DIR, ['--no-watchman']));
expect(stderr).toMatch(
/Whoops! Two projects resolved to the same config path/,
);
Expand Down

0 comments on commit cd77749

Please sign in to comment.