Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed Nov 19, 2024
1 parent aafffa2 commit c166784
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions sdk/__tests__/RaygunClient.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import { init, sendError } from '../src/RaygunClient';
import { RaygunClientOptions } from '../src/Types';
import { cleanup } from '@testing-library/react-native';

// jest.useFakeTimers();

describe('RaygunClient', () => {
beforeAll(() => {
Expand All @@ -28,8 +25,6 @@ describe('RaygunClient', () => {
fetch.mockClear();
});

afterEach(cleanup);

it('should send error correctly', async () => {
const error = new Error('Test error');
await sendError(error);
Expand All @@ -52,9 +47,8 @@ describe('RaygunClient', () => {
// failed to send error should be stored in AsyncStorage
const storedErrors = await AsyncStorage.getItem('raygun4reactnative_local_storage');
expect(storedErrors).not.toBeNull();
console.log(storedErrors);

const errors = JSON.parse(storedErrors);
expect(errors[0].Details.Error.Message).toBe('Failed error');
});
});
});

0 comments on commit c166784

Please sign in to comment.