mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
fixing rn jest tests
This commit is contained in:
parent
0fa341796f
commit
82e15f5ec7
3
app/mobile/__mocks__/react-native-create-thumbnail.js
vendored
Normal file
3
app/mobile/__mocks__/react-native-create-thumbnail.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
createThumbnail: jest.fn(),
|
||||
}
|
3
app/mobile/__mocks__/react-native-fs.js
vendored
Normal file
3
app/mobile/__mocks__/react-native-fs.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
readFile: jest.fn(),
|
||||
}
|
@ -73,6 +73,9 @@
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native",
|
||||
"setupFiles": [
|
||||
"<rootDir>/__mocks__/react-native-fs.js"
|
||||
],
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!((jest-)?react-native(-.*)?|@react-native(-community)?)/)"
|
||||
]
|
||||
|
@ -22,6 +22,8 @@ export function useTestStoreContext() {
|
||||
init: async () => {
|
||||
return null;
|
||||
},
|
||||
updateDb: async () => {
|
||||
},
|
||||
setSession: async (access) => {
|
||||
},
|
||||
clearSession: async () => {
|
||||
@ -147,6 +149,12 @@ export function useTestStoreContext() {
|
||||
getChannelTopicItems: async (guid, channelId) => {
|
||||
return [];
|
||||
},
|
||||
getChannelTopicItemsId: async (guid, channelId) => {
|
||||
return [];
|
||||
},
|
||||
getChannelTopicItemsById: async (guid, channelId, topcis) => {
|
||||
return [];
|
||||
},
|
||||
setChannelTopicItem: async (guid, channelId, topic) => {
|
||||
},
|
||||
setChannelTopicItemUnsealedDetail: async (guid, channelId, topicId, revision, unsealed) => {
|
||||
@ -196,7 +204,13 @@ export function useTestStoreContext() {
|
||||
|
||||
getCardChannelTopicItems: async (guid, cardId, channelId) => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
getCardChannelTopicItemsId: async (guid, cardId, channelId) => {
|
||||
return [];
|
||||
},
|
||||
getCardChannelTopicItemsById: async (guid, cardId, channelId, topics) => {
|
||||
return [];
|
||||
},
|
||||
setCardChannelTopicItem: async (guid, cardId, channelId, topic) => {
|
||||
},
|
||||
setCardChannelTopicItemUnsealedDetail: async (guid, cardId, channelId, topicId, revision, unsealed) => {
|
||||
|
Loading…
Reference in New Issue
Block a user