Files
Maagap/ioneapps-maagapp-ee31119a522d/__tests__/testHelpers/setupJest.js
2025-08-06 13:49:11 +08:00

18 lines
544 B
JavaScript

import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });
global.fetch = require('jest-fetch-mock');
// https://github.com/oblador/react-native-vector-icons/issues/433#issuecomment-354663885
const { NativeModules } = require('react-native');
const mockIcon = require('~/images/general/logo-color.png');
NativeModules.RNVectorIconsManager = {
getImageForFont: function getImageForFont(fontFamily, glyph, fontSize, color, callback) {
return callback(null, mockIcon);
},
};