Skip to content

Commit 417396b

Browse files
committed
Fix fixtures depending on minification
(Reminder to myself: Replace this with actual Jest snapshots already!)
1 parent 8d44acc commit 417396b

File tree

14 files changed

+28
-26
lines changed

14 files changed

+28
-26
lines changed

test/fixtures/01-add-display-names/after.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Test = styled.div.withConfig({
22
displayName: 'Test'
3-
})`width: 100%;`;
3+
})`width:100%;`;
44
const Test2 = styled('div').withConfig({
55
displayName: 'Test2'
66
})``;

test/fixtures/02-add-identifier/after.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Test = styled.div.withConfig({
22
componentId: "f15zqz-0"
3-
})`width: 100%;`;
3+
})`width:100%;`;
44
const Test2 = true ? styled.div.withConfig({
55
componentId: "f15zqz-1"
66
})`` : styled.div.withConfig({

test/fixtures/03-add-identifier-and-display-name/after.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Test = styled.div.withConfig({
22
displayName: "Test",
33
componentId: "s1j54k93-0"
4-
})`width: 100%;`;
4+
})`width:100%;`;
55
const Test2 = true ? styled.div.withConfig({
66
displayName: "Test2",
77
componentId: "s1j54k93-1"

test/fixtures/04-track-the-imported-variable/after.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import s from "styled-components";
33
const Test = s.div.withConfig({
44
displayName: "Test",
55
componentId: "syqrfc-0"
6-
})`width: 100%;`;
6+
})`width:100%;`;
77
const Test2 = true ? s.div.withConfig({
88
displayName: "Test2",
99
componentId: "syqrfc-1"

test/fixtures/05-use-file-name/after.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from "styled-components";
33
const Test = styled.div.withConfig({
44
displayName: "before__Test",
55
componentId: "gl3p53-0"
6-
})`color: red;`;
6+
})`color:red;`;
77
styled.div.withConfig({
88
displayName: "before",
99
componentId: "gl3p53-1"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Test = s.div.withConfig({
22
displayName: 'before__Test',
33
componentId: 's2wuo7o-0'
4-
})`width: 100%;`;
4+
})`width:100%;`;
55
import { default as s, css } from 'styled-components';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import styled from 'styled-components';
22

3-
const Test = styled.div`width: 100%;`;
3+
const Test = styled.div`width:100%;`;

test/fixtures/08-minify-css-to-use-with-transpilation/after.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
var _templateObject = _taggedTemplateLiteral(['width: 100%;'], ['width: 100%;']),
4-
_templateObject2 = _taggedTemplateLiteral(['content: " ', ' ";'], ['content: " ', ' ";']),
5-
_templateObject3 = _taggedTemplateLiteral(['content: " ', ' ";color: red;'], ['content: " ', ' ";color: red;']),
6-
_templateObject4 = _taggedTemplateLiteral(['color: red;'], ['color: red;']),
7-
_templateObject5 = _taggedTemplateLiteral(['&:hover {color: blue;}'], ['&:hover {color: blue;}']);
3+
var _templateObject = _taggedTemplateLiteral(['width:100%;'], ['width:100%;']),
4+
_templateObject2 = _taggedTemplateLiteral(['content:" ', ' ";'], ['content:" ', ' ";']),
5+
_templateObject3 = _taggedTemplateLiteral(['content:" ', ' ";color:red;'], ['content:" ', ' ";color:red;']),
6+
_templateObject4 = _taggedTemplateLiteral(['color:red;'], ['color:red;']),
7+
_templateObject5 = _taggedTemplateLiteral(['&:hover{color:blue;}'], ['&:hover{color:blue;}']);
88

99
var _styledComponents = require('styled-components');
1010

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import styled from 'styled-components';
22

3-
const Simple = styled.div`width: 100%;`;
3+
const Simple = styled.div`width:100%;`;
44

5-
const Interpolation = styled.div`content: "https://test.com/${props => props.endpoint}";`;
5+
const Interpolation = styled.div`content:"https://test.com/${props => props.endpoint}";`;
66

7-
const SpecialCharacters = styled.div`content: " ${props => props.text} ";color: red;`;
7+
const SpecialCharacters = styled.div`content:" ${props => props.text} ";color:red;`;
88

9-
const Comment = styled.div`width: 100%;color: red;`;
9+
const Comment = styled.div`width:100%;color:red;`;
1010

11-
const Parens = styled.div`&:hover {color: blue;}color: red;`;
11+
const Parens = styled.div`&:hover{color:blue;}color:red;`;
1212

13-
const UrlComments = styled.div`color: red;background: red;border: 1px solid green;`;
13+
const UrlComments = styled.div`color:red;background:red;border:1px solid green;`;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css, keyframes } from 'styled-components';
22

3-
const key = keyframes`to {transform: rotate(360deg);}`;
3+
const key = keyframes`to{transform:rotate(360deg);}`;
44

5-
const color = css`color: ${theColor};`;
5+
const color = css`color:${theColor};`;

0 commit comments

Comments
 (0)