Skip to content

Commit

Permalink
test(app-distribution): ensure modular API are exported properly (#7933)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley authored Jul 29, 2024
1 parent 0157296 commit f5a26ee
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 30 additions & 1 deletion packages/app-distribution/__tests__/app-distribution.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { describe, expect, it } from '@jest/globals';

import { firebase } from '../lib';
import {
firebase,
getAppDistribution,
isTesterSignedIn,
signInTester,
checkForUpdate,
signOutTester,
} from '../lib';

describe('appDistribution()', function () {
describe('namespace', function () {
Expand All @@ -10,4 +17,26 @@ describe('appDistribution()', function () {
expect(app.appDistribution().app).toEqual(app);
});
});

describe('modular', function () {
it('`getAppDistribution` function is properly exposed to end user', function () {
expect(getAppDistribution).toBeDefined();
});

it('`isTesterSignedIn` function is properly exposed to end user', function () {
expect(isTesterSignedIn).toBeDefined();
});

it('`signInTester` function is properly exposed to end user', function () {
expect(signInTester).toBeDefined();
});

it('`checkForUpdate` function is properly exposed to end user', function () {
expect(checkForUpdate).toBeDefined();
});

it('`signOutTester` function is properly exposed to end user', function () {
expect(signOutTester).toBeDefined();
});
});
});
2 changes: 2 additions & 0 deletions packages/app-distribution/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export const firebase: ReactNativeFirebase.Module & {

export default defaultExport;

export * from './modular';

/**
* Attach namespace to `firebase.` and `FirebaseApp.`.
*/
Expand Down

0 comments on commit f5a26ee

Please sign in to comment.