[ReactNative] Move NativeModules mock to OSS

This commit is contained in:
Alex Kotliarskyi 2015-04-23 09:41:45 -07:00
Родитель b72acc2313
Коммит 7de74b129d
1 изменённых файлов: 44 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,44 @@
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*/
'use strict';
var NativeModules = {
I18n: {
translationsDictionary: {
'Good bye, {name}!|Bye message': '¡Adiós {name}!',
},
},
Timing: {
createTimer: jest.genMockFunction(),
deleteTimer: jest.genMockFunction(),
},
GraphPhotoUpload: {
upload: jest.genMockFunction(),
},
FacebookSDK: {
login: jest.genMockFunction(),
logout: jest.genMockFunction(),
queryGraphPath: jest.genMockFunction().mockImpl(
(path, method, params, callback) => callback()
),
},
DataManager: {
queryData: jest.genMockFunction(),
},
UIManager: {
customBubblingEventTypes: {},
customDirectEventTypes: {},
},
AsyncLocalStorage: {
getItem: jest.genMockFunction(),
setItem: jest.genMockFunction(),
removeItem: jest.genMockFunction(),
clear: jest.genMockFunction(),
},
SourceCode: {
scriptURL: null,
},
};
module.exports = NativeModules;