|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | | -exports[`should swap out the import if styled-components v4+ is detected 1`] = ` |
4 | | -"\\"use strict\\"; |
5 | | -
|
6 | | -var _styledComponents = _interopRequireDefault(require(\\"styled-components\\")); |
| 3 | +exports[`should not swap out the import if styled-components v3 is detected 1`] = ` |
| 4 | +"import styled from 'styled-components'; |
| 5 | +const Named = styled(\\"div\\").withConfig({ |
| 6 | + displayName: \\"example__Named\\", |
| 7 | + componentId: \\"ghf2ss-0\\" |
| 8 | +})([\\"width:100%;\\"]); |
| 9 | +const NamedWithInterpolation = styled(\\"div\\").withConfig({ |
| 10 | + displayName: \\"example__NamedWithInterpolation\\", |
| 11 | + componentId: \\"ghf2ss-1\\" |
| 12 | +})([\\"color:\\", \\";\\"], props => props.color); |
| 13 | +const Wrapped = styled(Inner).withConfig({ |
| 14 | + displayName: \\"example__Wrapped\\", |
| 15 | + componentId: \\"ghf2ss-2\\" |
| 16 | +})([\\"color:red;\\"]);" |
| 17 | +`; |
7 | 18 |
|
8 | | -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 19 | +exports[`should swap out the import if styled-components v4 beta is detected 1`] = ` |
| 20 | +"import styled from \\"styled-components/no-tags\\"; |
| 21 | +const Named = styled(\\"div\\").withConfig({ |
| 22 | + displayName: \\"example__Named\\", |
| 23 | + componentId: \\"ghf2ss-0\\" |
| 24 | +})([\\"width:100%;\\"]); |
| 25 | +const NamedWithInterpolation = styled(\\"div\\").withConfig({ |
| 26 | + displayName: \\"example__NamedWithInterpolation\\", |
| 27 | + componentId: \\"ghf2ss-1\\" |
| 28 | +})([\\"color:\\", \\";\\"], props => props.color); |
| 29 | +const Wrapped = styled(Inner).withConfig({ |
| 30 | + displayName: \\"example__Wrapped\\", |
| 31 | + componentId: \\"ghf2ss-2\\" |
| 32 | +})([\\"color:red;\\"]);" |
| 33 | +`; |
9 | 34 |
|
10 | | -var Named = _styledComponents.default.div\` |
11 | | - width: 100%; |
12 | | -\`; |
13 | | -var NamedWithInterpolation = _styledComponents.default.div\` |
14 | | - color: \${function (props) { |
15 | | - return props.color; |
16 | | -}}; |
17 | | -\`; |
18 | | -var Wrapped = (0, _styledComponents.default)(Inner)\` |
19 | | - color: red; |
20 | | -\`;" |
| 35 | +exports[`should swap out the import if styled-components v4+ is detected 1`] = ` |
| 36 | +"import styled from \\"styled-components/no-tags\\"; |
| 37 | +const Named = styled(\\"div\\").withConfig({ |
| 38 | + displayName: \\"example__Named\\", |
| 39 | + componentId: \\"ghf2ss-0\\" |
| 40 | +})([\\"width:100%;\\"]); |
| 41 | +const NamedWithInterpolation = styled(\\"div\\").withConfig({ |
| 42 | + displayName: \\"example__NamedWithInterpolation\\", |
| 43 | + componentId: \\"ghf2ss-1\\" |
| 44 | +})([\\"color:\\", \\";\\"], props => props.color); |
| 45 | +const Wrapped = styled(Inner).withConfig({ |
| 46 | + displayName: \\"example__Wrapped\\", |
| 47 | + componentId: \\"ghf2ss-2\\" |
| 48 | +})([\\"color:red;\\"]);" |
21 | 49 | `; |
0 commit comments