报错如下 Expected value to be (using Object.is): 1 Received: 0 12 | </IntlProvider> 13 | ); > 14 | expect(wrapper.find('.fullscreen-modal').length).toBe(1); 15 | }); 16 | }); spec.js如下import React from 'react';import { shallow } from 'enzyme';import { IntlProvider } from 'react-intl';import AllocatingModal from './allocatingModal';describe('AllocatingModal', () => { // eslint-disable-line no-undef it('render', () => { // eslint-disable-line no-undef const wrapper = shallow( <IntlProvider locale="zh"> <AllocatingModal /> </IntlProvider> ); expect(wrapper.find('.fullscreen-modal').length).toBe(1); });});jsx如下<Modal maskClosable={false} title={title} width="100%" wrapClassName="fullscreen-modal" closable={false} visible={this.props.visible} footer={null} >明明有 为什么取不到呢?
添加回答
举报
0/150
提交
取消