Skip to content

Update README.md #1045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@ The hassle-free way to add Segment analytics to your React-Native app.





## Table of Contents

- [@segment/analytics-react-native](#segmentanalytics-react-native)

Unchanged files with check annotations Beta

},
};
const store = new MockSegmentStore({

Check warning on line 176 in packages/core/src/__tests__/internal/checkInstalledVersion.test.ts

GitHub Actions / build-and-test

'store' is already declared in the upper scope on line 22 column 9
context: {
...currentContext,
...injectedContextByPlugins,
expect(appStateChangeListener).toBeDefined();
appStateChangeListener!(to);

Check warning on line 64 in packages/core/src/__tests__/internal/handleAppStateChange.test.ts

GitHub Actions / build-and-test

Forbidden non-null assertion
// Since the calls to process lifecycle events are not awaitable we have to await for ticks here
await new Promise(process.nextTick);
await new Promise(process.nextTick);
it('stamps basic data: timestamp and messageId for pending events when not ready', async () => {
const client = new SegmentClient(clientArgs);
jest.spyOn(client.isReady, 'value', 'get').mockReturnValue(false);
// @ts-ignore

Check warning on line 41 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const timeline = client.timeline;
jest.spyOn(timeline, 'process');
};
// While not ready only timestamp and messageId should be defined
// @ts-ignore

Check warning on line 56 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const pendingEvents = client.store.pendingEvents.get();
expect(pendingEvents.length).toBe(1);
const pendingEvent = pendingEvents[0];
// When ready it replays events
jest.spyOn(client.isReady, 'value', 'get').mockReturnValue(true);
// @ts-ignore

Check warning on line 69 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
await client.onReady();
expectedEvent = {
...expectedEvent,
anonymousId: store.userInfo.get().anonymousId,
};
// @ts-ignore

Check warning on line 78 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
expect(client.store.pendingEvents.get().length).toBe(0);
expect(timeline.process).toHaveBeenCalledWith(
const client = new SegmentClient(clientArgs);
jest.spyOn(client.isReady, 'value', 'get').mockReturnValue(true);
// @ts-ignore

Check warning on line 90 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const timeline = client.timeline;
jest.spyOn(timeline, 'process');
anonymousId: store.userInfo.get().anonymousId,
} as SegmentEvent;
// @ts-ignore

Check warning on line 107 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const pendingEvents = client.store.pendingEvents.get();
expect(pendingEvents.length).toBe(0);
const client = new SegmentClient(clientArgs);
jest.spyOn(client.isReady, 'value', 'get').mockReturnValue(true);
// @ts-ignore

Check warning on line 120 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const timeline = client.timeline;
jest.spyOn(timeline, 'process');
anonymousId: 'foo',
} as SegmentEvent;
// @ts-ignore

Check warning on line 152 in packages/core/src/__tests__/methods/process.test.ts

GitHub Actions / build-and-test

Do not use "@ts-ignore" because it alters compilation errors
const pendingEvents = client.store.pendingEvents.get();
expect(pendingEvents.length).toBe(0);