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AI,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,UAAU,EAAE,CAAC,CAAC;gBACrE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","names":[],"sources":["/Users/thomas/Source/react-native-core/source/components/buttons/CrossButton.test.tsx"],"sourcesContent":["import React from 'react';\nimport CrossButton from './CrossButton';\nimport FontAwesome from 'react-native-vector-icons/FontAwesome';\nimport TestRenderer from 'react-test-renderer';\nimport { Colors } from '../../styles';\n\nfunction setup(iconName: string, title?: any) {\n  return TestRenderer.create(\n    <CrossButton iconName={iconName} title={title} onPress={jest.fn()} />\n  );\n}\n\njest.unmock('react-native');\njest.unmock('./CrossButton');\n\ndescribe('components', () => {\n  /**\n   * Test component rendering. Properties of children might be tested by importing their type:\n   *```\n      const btn = wrapper.root.findByType(Button); // or findByProps({ mode: 'text' });\n      expect(btn.props.title).toBe('child');\n      ```\n   */\n  describe('<CrossButton />', () => {\n    describe('With `title` and `iconName` properties provided', () => {\n      it('Component should render', () => {\n        const wrapper = setup('home', 'home');\n        expect(wrapper.toJSON()).toMatchSnapshot();\n      });\n\n      it('Should have paper <Button />', () => {\n        const wrapper = setup('home', 'home');\n        const child = wrapper.root.findByProps({ color: Colors.NextButton });\n\n        expect(child.type).toEqual('View');\n      });\n\n      it('Should have paper `<Button />` with `mode` property set to \"text\"', () => {\n        const wrapper = setup('home', 'home');\n        const child = wrapper.root.findByProps({ mode: 'text' });\n        expect(child).toBeDefined();\n      });\n\n      it('Should have paper `<FontAwesome />` icon with `mode` property set to \"text\"', () => {\n        const wrapper = setup('home', 'home');\n        const child = wrapper.root.findByProps({ mode: 'text' });\n        expect(child).toBeDefined();\n      });\n    });\n\n    describe('With `iconName` but without `title` property provided', () => {\n      it('Component should render', () => {\n        const wrapper = setup('map', undefined);\n        expect(wrapper.toJSON()).toMatchSnapshot();\n      });\n\n      it('Should have `<FontAwesome.Button />`', () => {\n        const wrapper = setup('map', undefined);\n        const child = wrapper.root.findByType(FontAwesome.Button);\n        expect(child).toBeDefined();\n      });\n\n      it('Should have `<FontAwesome.Button />` with `iconName`', () => {\n        const wrapper = setup('map', undefined);\n        const child = wrapper.root.findByProps({ color: Colors.CrossBlack });\n        expect(child.props.name).toBe('map');\n      });\n    });\n  });\n});\n"],"version":3}