Skip to content

Commit

Permalink
chore(analytics): PR review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Aug 28, 2020
1 parent 60176c3 commit fde7651
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/analytics/e2e/analytics.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ describe('analytics()', () => {
});
});

describe('setCurrentScreen()', () => {
it('screenName only', async () => {
await firebase.analytics().setCurrentScreen('invertase screen');
});

it('screenName with screenClassOverride', async () => {
await firebase.analytics().setCurrentScreen('invertase screen', 'invertase class override');
});
});

describe('setMinimumSessionDuration()', () => {
it('default duration', async () => {
await firebase.analytics().setMinimumSessionDuration();
Expand Down
1 change: 1 addition & 0 deletions packages/analytics/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class FirebaseAnalyticsModule extends FirebaseModule {
}

setCurrentScreen(screenName, screenClassOverride) {
// eslint-disable-next-line no-console
console.warn(
'firebase.analytics().setCurrentScreen(), is now deprecated. Please use firebase.analytics().logScreenView() instead',
);
Expand Down

0 comments on commit fde7651

Please sign in to comment.