react-native-cross-components
Version:
Beautiful React-Native components using RN Paper by Callstack
1 lines • 2.81 kB
Source Map (JSON)
{"file":"/Users/thomas/Source/react-native-core/source/components/labels/CrossLabel.test.tsx","mappings":";;;;;AAMA,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC5B,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAP5B,kDAA0B;AAC1B,8DAA4D;AAC5D,8EAA+C;AAC/C,2DAA8C;AAC9C,+CAAoC;AAKpC;;;;;;KAMK;AACL,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;YAC5C,MAAM,SAAS,GAAqB,EAAE,CAAC;YACvC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;gBAC/B,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;YACtC,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;gBAC1D,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,MAAM,OAAO,GAAG,6BAAY,CAAC,MAAM,CAAC,8BAAC,oBAAU,OAAG,CAAC,CAAC;YACpD,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YAChE,MAAM,OAAO,GAAG,6BAAY,CAAC,MAAM,CACjC,8BAAC,oBAAU,IAAC,UAAU,EAAE,IAAI,sCAEf,CACd,CAAC;YACF,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,6BAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,cAAc,CAAC,mBAAI,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","names":[],"sources":["/Users/thomas/Source/react-native-core/source/components/labels/CrossLabel.test.tsx"],"sourcesContent":["import React from 'react';\nimport CrossLabel, { ICrossLabelProps } from './CrossLabel';\nimport TestRenderer from 'react-test-renderer';\nimport { Headline } from 'react-native-paper';\nimport { View } from 'react-native';\n\njest.unmock('react-native');\njest.unmock('./CrossLabel');\n\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 */\ndescribe('components', () => {\n describe('<CrossLabel />', () => {\n describe('`ICrossLabelProps` interface', () => {\n const propsMock: ICrossLabelProps = {};\n it('Should match snapshot', () => {\n expect(propsMock).toMatchSnapshot();\n });\n\n it('Should have `isTitle` property that is undefined', () => {\n expect(propsMock.isTitle).toBeUndefined();\n });\n });\n\n it('Component should render', () => {\n const wrapper = TestRenderer.create(<CrossLabel />);\n expect(wrapper.toJSON()).toMatchSnapshot();\n });\n\n it('When `isHeadline`is `true` should contain <Headline />', () => {\n const wrapper = TestRenderer.create(\n <CrossLabel isHeadline={true}>\n Crossplatform (isHeadline=true)\n </CrossLabel>\n );\n const child = wrapper.root.findByType(Headline);\n expect(child.instance).toBeInstanceOf(View);\n });\n });\n});\n"],"version":3}