Skip to content

Commit

Permalink
[home] Mock ExponentKernel.sdkVersions correctly in UserSessions test
Browse files Browse the repository at this point in the history
We don't want to overwrite the ExponentKernel mock that is already provided -- assign to the one that's already there.
  • Loading branch information
ide committed Nov 10, 2018
1 parent e52cb9e commit 7141e1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions home/api/__tests__/UserSessions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import SessionActions from '../../redux/SessionActions';
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
jest.mock('react-native', () => {
const ReactNative = require.requireActual('react-native');
ReactNative.NativeModules.ExponentKernel = {
sdkVersions: '12.0.0,11.0.0',
};
ReactNative.NativeModules.ExponentKernel.sdkVersions = '12.0.0,11.0.0';
ReactNative.AsyncStorage.setItem = () => {};
return ReactNative;
});
Expand Down

0 comments on commit 7141e1e

Please sign in to comment.