1 Star 0 Fork 1

yunduanyueying / growth

forked from phodal / growth 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
jest.setup.js 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
phodal 提交于 2017-06-19 14:25 . [LeetCode] add unzip package
/* global jest fetch */
fetch = jest.fn(() => new Promise(resolve => resolve()));
jest.mock('react-native-fs', () => ({
writeFile: jest.fn(() => Promise.resolve()),
ExternalStorageDirectoryPath: 'package-path',
}));
jest.mock('react-native-splash-screen', () => ({
hide: jest.fn(),
}));
jest.mock('react-native-device-info', () => ({
getVersion: jest.fn(),
}));
jest.mock('react-native-fetch-blob', () => ({
DocumentDir: () => {},
polyfill: () => {},
config() {
return this;
},
fetch() {
return this;
},
progress() {
return this;
},
then() {
return this;
},
catch() {
return this;
},
fs: {
dirs: {},
},
}));
jest.mock('react-native-simple-toast', () => (jest.fn()));
jest.mock('ScrollView', () => jest.genMockFromModule('ScrollView'));
jest.mock('Linking', () =>
({
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
openURL: jest.fn(),
canOpenURL: jest.fn(
() => new Promise(resolve => resolve(true)),
),
getInitialURL: jest.fn(),
}),
);
jest.mock('WebView', () => 'WebView');
jest.mock('react-native-zip-archive', () => ({
unzip: jest.fn(),
}));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/yunduanyueying/growth.git
git@gitee.com:yunduanyueying/growth.git
yunduanyueying
growth
growth
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891