Skip to content

Commit

Permalink
[test-suite] Add test for Consts.installationId = await getInstallati…
Browse files Browse the repository at this point in the history
…onIdAsync()
  • Loading branch information
sjchmiela committed Jan 13, 2020
1 parent 9a43675 commit 68ed7e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/test-suite/tests/Application.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as Application from 'expo-application';
import Constants from 'expo-constants';
import { Platform } from 'react-native';
import ExponentTest from '../ExponentTest';

Expand Down Expand Up @@ -41,6 +42,14 @@ export async function test({ describe, it, expect, jasmine }) {
expect(installationId).toBeDefined();
expect(installationId).toEqual(jasmine.any(String));
});

if (['expo', 'standalone'].includes(Constants.appOwnership)) {
it('in managed workflow returns Constants.installationId', async () => {
let installationId = await Application.getInstallationIdAsync();
expect(installationId).toBeDefined();
expect(installationId).toBe(Constants.installationId);
});
}
});
});

Expand Down

0 comments on commit 68ed7e1

Please sign in to comment.