diff --git a/packages/in-app-messaging/__tests__/inappmessaging.test.ts b/packages/in-app-messaging/__tests__/inappmessaging.test.ts new file mode 100644 index 0000000000..05ae1c6ba3 --- /dev/null +++ b/packages/in-app-messaging/__tests__/inappmessaging.test.ts @@ -0,0 +1,46 @@ +import { describe, expect, it } from '@jest/globals'; + +import { + firebase, + getInAppMessaging, + isMessagesDisplaySuppressed, + setMessagesDisplaySuppressed, + isAutomaticDataCollectionEnabled, + setAutomaticDataCollectionEnabled, + triggerEvent, +} from '../lib'; + +describe('in-app-messaging', function () { + describe('namespace', function () { + it('accessible from firebase.app()', function () { + const app = firebase.app(); + expect(app.inAppMessaging).toBeDefined(); + }); + }); + + describe('modular', function () { + it('`getInAppMessaging` function is properly exposed to end user', function () { + expect(getInAppMessaging).toBeDefined(); + }); + + it('`isMessagesDisplaySuppressed` function is properly exposed to end user', function () { + expect(isMessagesDisplaySuppressed).toBeDefined(); + }); + + it('`setMessagesDisplaySuppressed` function is properly exposed to end user', function () { + expect(setMessagesDisplaySuppressed).toBeDefined(); + }); + + it('`isAutomaticDataCollectionEnabled` function is properly exposed to end user', function () { + expect(isAutomaticDataCollectionEnabled).toBeDefined(); + }); + + it('`setAutomaticDataCollectionEnabled` function is properly exposed to end user', function () { + expect(setAutomaticDataCollectionEnabled).toBeDefined(); + }); + + it('`triggerEvent` function is properly exposed to end user', function () { + expect(triggerEvent).toBeDefined(); + }); + }); +}); diff --git a/packages/in-app-messaging/lib/index.d.ts b/packages/in-app-messaging/lib/index.d.ts index cc3c46fbb0..a8299fa5db 100644 --- a/packages/in-app-messaging/lib/index.d.ts +++ b/packages/in-app-messaging/lib/index.d.ts @@ -161,6 +161,8 @@ export const firebase: ReactNativeFirebase.Module & { export default defaultExport; +export * from './modular'; + /** * Attach namespace to `firebase.` and `FirebaseApp.`. */