Я провожу шутное тестирование в реактивной системе.
но я получаю эти ошибки при запуске тестов. ● Не удалось запустить набор тестов
TypeError: (0 , _reactNativeTheming.createStyle) is not a function
3 | import Colors from '../../../assets/Colors/Colors';
4 |
> 5 | export default createStyle({
| ^
6 | container: {
7 | flex: 1,
8 | },
Ниже перечислены пакеты, которые я использую в пакете. json
«реагировать»: «16.8.3», «реагировать-нативно»: "0.59.9", "babel-jest": "^ 24.1.0", "jest": "^ 24.1.0", "jsdom": "^ 13.2.0",
"jest": {
"setupFilesAfterEnv": [
"<rootDir>/__tests__/setup/test-setup.js"
],
"setupFiles": [
"<rootDir>/__tests__/setup/test-setup.js"
],
"transformIgnorePatterns": [
"/node_modules(?![\\/]rn-fetch-blob[\\/]|[\\/]react-native[\\/]|[\\/]react-native-config[\\/]|[\\/]react-native-navigation[\\/]|[\\/]react-native-status-bar-height[\\/]|[\\/]react-native-animatable[\\/]|[\\/]react-native-restart[\\/]|[\\/]react-native-linear-gradient[\\/]|[\\/]react-native-i18n[\\/]|[\\/]react-native-modal[\\/]|[\\/]react-native-smooth-pincode-input[\\/]|[\\/]react-native-swipe-gestures[\\/]|[\\/]react-native-root-toast[\\/]|[\\/]react-native-root-siblings[\\/]|[\\/]static-container[\\/]|[\\/]react-native-elements[\\/]|[\\/]react-native-ratings[\\/]|[\\/]react-native-progress[\\/]|[\\/]react-native-dialog[\\/]|[\\/]react-native-pdf[\\/]|[\\/]react-native-webview[\\/]|[\\/]react-native-check-box[\\/]|[\\/]react-native-share[\\/]|[\\/]react-native-haptic-feedback[\\/]|[\\/]react-native-responsive-screen[\\/]|[\\/]react-native-keyboard-aware-scroll-view[\\/]|[\\/]he[\\/]|[\\/]react-native-iphone-x-helper[\\/]|[\\/]check-prop-types[\\/]|[\\/]react-native-image-progress[\\/]|[\\/]react-native-theming[\\/]|[\\/]@react-native-community/async-storage[\\/])/"
],
"testPathIgnorePatterns": [
"<rootDir>/(build|docs|node_modules)/",
"<rootDir>/__tests__/setup"
],
"transform": {
"^.+\\.js?$": "babel-jest"
},
"transformIgnorePatterns": [
"!node_modules/react-runtime"
],
"preset": "react-native"
},
import React from 'react';
import Enzyme, { shallow } from 'enzyme';
import EnzymeAdapter from 'enzyme-adapter-react-16';
import DevelopersSection from '../../../src/containers/Mortgage/MortgageDashboard/DevelopersSection';
I18nJs.locale = 'en';
Enzyme.configure({ adapter: new EnzymeAdapter() });
const defaultProps = {
Developer: {
City: {
citycode: "Jeddah"
},
companyregno: "324",
developercode: "AlKhom",
developertype: "",
email: "dev@ccc.com",
featured: "1",
ordar: "3",
phone: "11223456",
title: "AlKhomasiah"
}
};
describe('<DevelopersSection /> rendering', () => {
const wrapper = shallow(<DevelopersSection developers={defaultProps}/>);
expect(wrapper).toMatchSnapshot();
});
Может кто-нибудь, пожалуйста, помогите мне.