Skip to content

Commit 1534364

Browse files
committed
Fix lint issues
1 parent efac955 commit 1534364

2 files changed

Lines changed: 7 additions & 22 deletions

File tree

packages/core/src/js/integrations/nativestackrecovery.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export const nativeStackRecoveryIntegration = (): Integration => {
2222
setupOnce: () => {
2323
/* noop */
2424
},
25-
preprocessEvent: (event: Event, hint: EventHint, client: Client): void =>
26-
preprocessEvent(event, hint, client),
25+
preprocessEvent: (event: Event, hint: EventHint, client: Client): void => preprocessEvent(event, hint, client),
2726
};
2827
};
2928

packages/core/test/integrations/nativestackrecovery.test.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ describe('NativeStackRecovery', () => {
3838

3939
it('does nothing when native is disabled', () => {
4040
(NATIVE as any).enableNative = false;
41-
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(
42-
'Error: test\n at foo (file.js:1:1)',
43-
);
41+
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue('Error: test\n at foo (file.js:1:1)');
4442

4543
const event = executeIntegrationFor(
4644
{
@@ -57,9 +55,7 @@ describe('NativeStackRecovery', () => {
5755

5856
it('does nothing on non-android platforms', () => {
5957
Platform.OS = 'ios';
60-
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(
61-
'Error: test\n at foo (file.js:1:1)',
62-
);
58+
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue('Error: test\n at foo (file.js:1:1)');
6359

6460
const event = executeIntegrationFor(
6561
{
@@ -144,9 +140,7 @@ describe('NativeStackRecovery', () => {
144140
});
145141

146142
it('does nothing when cached stack cannot be parsed', () => {
147-
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(
148-
'not a valid stack trace',
149-
);
143+
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue('not a valid stack trace');
150144

151145
const event = executeIntegrationFor(
152146
{
@@ -161,20 +155,15 @@ describe('NativeStackRecovery', () => {
161155
});
162156

163157
it('does nothing when event has no exception', () => {
164-
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(
165-
'Error: test\n at foo (file.js:1:1)',
166-
);
158+
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue('Error: test\n at foo (file.js:1:1)');
167159

168160
executeIntegrationFor({}, {});
169161

170162
expect(NATIVE.fetchCachedJavascriptExceptionStack).not.toHaveBeenCalled();
171163
});
172164

173165
it('does nothing when exception has empty frames array', () => {
174-
const cachedStack = [
175-
'Error: test',
176-
' at foo (http://localhost:8081/index.bundle:1:100)',
177-
].join('\n');
166+
const cachedStack = ['Error: test', ' at foo (http://localhost:8081/index.bundle:1:100)'].join('\n');
178167

179168
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(cachedStack);
180169

@@ -198,10 +187,7 @@ describe('NativeStackRecovery', () => {
198187
});
199188

200189
it('only patches the primary exception (values[0]) when multiple exception values exist', () => {
201-
const cachedStack = [
202-
'Error: test',
203-
' at foo (http://localhost:8081/index.bundle:1:100)',
204-
].join('\n');
190+
const cachedStack = ['Error: test', ' at foo (http://localhost:8081/index.bundle:1:100)'].join('\n');
205191

206192
(NATIVE.fetchCachedJavascriptExceptionStack as jest.Mock).mockReturnValue(cachedStack);
207193

0 commit comments

Comments
 (0)