Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ychi committed Apr 22, 2020
1 parent 03a9297 commit 4873bd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/jest-message-util/src/__tests__/messages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ it('no stack', () => {
expect(message).toMatchSnapshot();
});

describe('getConsoleOutput', () =>{
describe('getConsoleOutput', () => {
it('prints code frame and stacktrace', () => {
readFileSync.mockImplementationOnce(() => 'throw new Error("Whoops!");');
const message = formatStackTrace(
Expand All @@ -312,10 +312,10 @@ describe('getConsoleOutput', () =>{
},
'path_test',
);

expect(message).toMatchSnapshot();
});

it('does not print code frame when noCodeFrame = true', () => {
readFileSync.mockImplementationOnce(() => 'throw new Error("Whoops!");');
const message = formatStackTrace(
Expand All @@ -337,10 +337,10 @@ describe('getConsoleOutput', () =>{
},
'path_test',
);

expect(message).toMatchSnapshot();
});

it('does not print codeframe when noStackTrace = true', () => {
readFileSync.mockImplementationOnce(() => 'throw new Error("Whoops!");');
const message = formatStackTrace(
Expand All @@ -361,7 +361,7 @@ describe('getConsoleOutput', () =>{
},
'path_test',
);

expect(message).toMatchSnapshot();
});
});
2 changes: 1 addition & 1 deletion packages/jest-message-util/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export const formatStackTrace = (
? slash(path.relative(config.rootDir, testPath))
: null;

if ((!options.noStackTrace) && (!options.noCodeFrame)) {
if (!options.noStackTrace && !options.noCodeFrame) {
const topFrame = getTopFrame(lines);
if (topFrame) {
const {column, file: filename, line} = topFrame;
Expand Down

0 comments on commit 4873bd2

Please sign in to comment.