Skip to content

Commit 1e89747

Browse files
committed
fix: lint
1 parent 080df3d commit 1e89747

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

e2e/failures/__tests__/throwObjectWithStackProp.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
'use strict';
99

1010
// eslint-disable-next-line no-throw-literal
11-
throw {stack: 42};
11+
throw {stack: 42};

packages/jest-message-util/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,10 @@ export const separateMessageFromStack = (
391391
// If the error is a plain "Error:" instead of a SyntaxError or TypeError we
392392
// remove the prefix from the message because it is generally not useful.
393393
const ERROR_REGEXP = /^(?:Error: )?([\s\S]*?(?=\n\s*at\s.*:\d*:\d*)|\s*.*)([\s\S]*)$/;
394-
const messageMatch = typeof content !== 'string' ? `${content}`.match(ERROR_REGEXP) : content.match(ERROR_REGEXP);
394+
const messageMatch =
395+
typeof content !== 'string'
396+
? `${content}`.match(ERROR_REGEXP)
397+
: content.match(ERROR_REGEXP);
395398
if (!messageMatch) {
396399
// For typescript
397400
throw new Error('If you hit this error, the regex above is buggy.');

0 commit comments

Comments
 (0)