Skip to content

Commit 764b0d8

Browse files
salmanmdanielduan
authored andcommittedOct 24, 2019
fix all expected fixtures to expect the docgenInfo before default export
1 parent 221c148 commit 764b0d8

File tree

14 files changed

+70
-74
lines changed

14 files changed

+70
-74
lines changed
 

‎test/fixtures/case2/expected.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ function (_React$Component) {
5656
ErrorBox.propTypes = {
5757
children: _react["default"].PropTypes.node.isRequired
5858
};
59-
var _default = ErrorBox;
60-
exports["default"] = _default;
6159
ErrorBox.__docgenInfo = {
6260
"description": "",
6361
"methods": [],
@@ -72,11 +70,13 @@ ErrorBox.__docgenInfo = {
7270
}
7371
}
7472
};
73+
var _default = ErrorBox;
74+
exports["default"] = _default;
7575

7676
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
7777
STORYBOOK_REACT_CLASSES["test/fixtures/case2/actual.js"] = {
7878
name: "ErrorBox",
7979
docgenInfo: ErrorBox.__docgenInfo,
8080
path: "test/fixtures/case2/actual.js"
8181
};
82-
}
82+
}

‎test/fixtures/case3/expected.js

+10-11
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ Button.propTypes = {
2525
onClick: _react["default"].PropTypes.func,
2626
style: _react["default"].PropTypes.object
2727
};
28-
var _default = Button;
29-
exports["default"] = _default;
30-
var A;
31-
A = [1, 2, 2, 2];
32-
33-
function abc() {
34-
var c = function cef() {
35-
A = 'str';
36-
};
37-
}
38-
3928
Button.__docgenInfo = {
4029
"description": "",
4130
"methods": [],
@@ -68,6 +57,16 @@ Button.__docgenInfo = {
6857
}
6958
}
7059
};
60+
var _default = Button;
61+
exports["default"] = _default;
62+
var A;
63+
A = [1, 2, 2, 2];
64+
65+
function abc() {
66+
var c = function cef() {
67+
A = 'str';
68+
};
69+
}
7170

7271
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
7372
STORYBOOK_REACT_CLASSES["test/fixtures/case3/actual.js"] = {

‎test/fixtures/case4/expected.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ Button.propTypes = {
2525
onClick: _react["default"].PropTypes.func,
2626
style: _react["default"].PropTypes.object
2727
};
28-
var _default = Button;
29-
exports["default"] = _default;
30-
var A;
31-
A = [1, 2, 2, 2];
32-
33-
function abc() {
34-
var c = function cef() {
35-
A = 'str';
36-
};
37-
}
38-
3928
Button.__docgenInfo = {
4029
"description": "",
4130
"methods": [],
@@ -68,11 +57,21 @@ Button.__docgenInfo = {
6857
}
6958
}
7059
};
60+
var _default = Button;
61+
exports["default"] = _default;
62+
var A;
63+
A = [1, 2, 2, 2];
64+
65+
function abc() {
66+
var c = function cef() {
67+
A = 'str';
68+
};
69+
}
7170

7271
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
7372
STORYBOOK_REACT_CLASSES["test/fixtures/case4/actual.js"] = {
7473
name: "Button",
7574
docgenInfo: Button.__docgenInfo,
7675
path: "test/fixtures/case4/actual.js"
7776
};
78-
}
77+
}

‎test/fixtures/case5/expected.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ var First = function First(_ref) {
2323
First.propTypes = {
2424
children: _react.PropTypes.node
2525
};
26-
var _default = First;
27-
exports["default"] = _default;
2826
First.__docgenInfo = {
2927
"description": "",
3028
"methods": [],
@@ -39,6 +37,8 @@ First.__docgenInfo = {
3937
}
4038
}
4139
};
40+
var _default = First;
41+
exports["default"] = _default;
4242

4343
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
4444
STORYBOOK_REACT_CLASSES["test/fixtures/case5/actual.js"] = {

‎test/fixtures/example/expected.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ function (_Component) {
6666
return App;
6767
}(_react.Component);
6868

69-
var _default = App;
70-
exports["default"] = _default;
7169
App.__docgenInfo = {
7270
"description": "",
7371
"methods": [],
7472
"displayName": "App"
7573
};
74+
var _default = App;
75+
exports["default"] = _default;
7676

7777
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
7878
STORYBOOK_REACT_CLASSES["test/fixtures/example/actual.js"] = {

‎test/fixtures/flowType/expected.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ function (_React$Component) {
6666
return FlowTypeButton;
6767
}(_react["default"].Component);
6868

69-
var _default = FlowTypeButton;
70-
exports["default"] = _default;
7169
FlowTypeButton.__docgenInfo = {
7270
"description": "",
7371
"methods": [{
@@ -107,6 +105,8 @@ FlowTypeButton.__docgenInfo = {
107105
}
108106
}
109107
};
108+
var _default = FlowTypeButton;
109+
exports["default"] = _default;
110110

111111
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
112112
STORYBOOK_REACT_CLASSES["test/fixtures/flowType/actual.js"] = {

‎test/fixtures/functionDeclaration/expected.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ function FuncDeclaration(_ref) {
2323
FuncDeclaration.propTypes = {
2424
children: _react.PropTypes.node
2525
};
26-
var _default = FuncDeclaration;
27-
exports["default"] = _default;
2826
FuncDeclaration.__docgenInfo = {
2927
"description": "",
3028
"methods": [],
@@ -39,6 +37,8 @@ FuncDeclaration.__docgenInfo = {
3937
}
4038
}
4139
};
40+
var _default = FuncDeclaration;
41+
exports["default"] = _default;
4242

4343
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
4444
STORYBOOK_REACT_CLASSES["test/fixtures/functionDeclaration/actual.js"] = {

‎test/fixtures/hoc-function/expected.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ TestComponent.propTypes = {
3030
/** Called on click */
3131
onClick: _propTypes["default"].func
3232
};
33-
3433
TestComponent.__docgenInfo = {
3534
"description": "",
3635
"methods": [],
@@ -63,4 +62,4 @@ if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
6362
docgenInfo: TestComponent.__docgenInfo,
6463
path: "test/fixtures/hoc-function/actual.js"
6564
};
66-
}
65+
}

‎test/fixtures/hoc-multiple/expected.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ Component.propTypes = {
5959
/** Fancy styles in here */
6060
style: React.PropTypes.object
6161
};
62-
63-
var _default = withHoc()(deeperHoc(Component));
64-
65-
exports["default"] = _default;
6662
Component.__docgenInfo = {
6763
"description": "Super tiny component",
6864
"methods": [],
@@ -95,10 +91,14 @@ Component.__docgenInfo = {
9591
}
9692
};
9793

94+
var _default = withHoc()(deeperHoc(Component));
95+
96+
exports["default"] = _default;
97+
9898
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
9999
STORYBOOK_REACT_CLASSES["test/fixtures/hoc-multiple/actual.js"] = {
100100
name: "Component",
101101
docgenInfo: Component.__docgenInfo,
102102
path: "test/fixtures/hoc-multiple/actual.js"
103103
};
104-
}
104+
}

‎test/fixtures/hoc/expected.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ Component.propTypes = {
5959
/** Fancy styles in here */
6060
style: React.PropTypes.object
6161
};
62-
63-
var _default = withHoc(Component);
64-
65-
exports["default"] = _default;
6662
Component.__docgenInfo = {
6763
"description": "Super tiny component",
6864
"methods": [],
@@ -95,10 +91,14 @@ Component.__docgenInfo = {
9591
}
9692
};
9793

94+
var _default = withHoc(Component);
95+
96+
exports["default"] = _default;
97+
9898
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
9999
STORYBOOK_REACT_CLASSES["test/fixtures/hoc/actual.js"] = {
100100
name: "Component",
101101
docgenInfo: Component.__docgenInfo,
102102
path: "test/fixtures/hoc/actual.js"
103103
};
104-
}
104+
}

‎test/fixtures/multiple-exports/expected.js

+18-19
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ function (_React$Component) {
5656
ErrorBox.propTypes = {
5757
children: _react["default"].PropTypes.node.isRequired
5858
};
59+
ErrorBox.__docgenInfo = {
60+
"description": "",
61+
"methods": [],
62+
"displayName": "ErrorBox",
63+
"props": {
64+
"children": {
65+
"type": {
66+
"name": "node"
67+
},
68+
"required": true,
69+
"description": ""
70+
}
71+
}
72+
};
5973
var _default = ErrorBox;
6074
exports["default"] = _default;
6175

@@ -87,12 +101,12 @@ exports.ErrorBox2 = ErrorBox2;
87101
ErrorBox2.propTypes = {
88102
children2: _react["default"].PropTypes.node.isRequired
89103
};
90-
ErrorBox.__docgenInfo = {
104+
ErrorBox2.__docgenInfo = {
91105
"description": "",
92106
"methods": [],
93-
"displayName": "ErrorBox",
107+
"displayName": "ErrorBox2",
94108
"props": {
95-
"children": {
109+
"children2": {
96110
"type": {
97111
"name": "node"
98112
},
@@ -110,25 +124,10 @@ if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
110124
};
111125
}
112126

113-
ErrorBox2.__docgenInfo = {
114-
"description": "",
115-
"methods": [],
116-
"displayName": "ErrorBox2",
117-
"props": {
118-
"children2": {
119-
"type": {
120-
"name": "node"
121-
},
122-
"required": true,
123-
"description": ""
124-
}
125-
}
126-
};
127-
128127
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
129128
STORYBOOK_REACT_CLASSES["test/fixtures/multiple-exports/actual.js"] = {
130129
name: "ErrorBox2",
131130
docgenInfo: ErrorBox2.__docgenInfo,
132131
path: "test/fixtures/multiple-exports/actual.js"
133132
};
134-
}
133+
}

‎test/fixtures/multipleExports2/expected.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ Breadcrumb.defaultProps = {
137137
className: '',
138138
foreColor: ''
139139
};
140-
var _default = Breadcrumb;
141-
exports["default"] = _default;
142140
Breadcrumb.__docgenInfo = {
143141
"description": "",
144142
"methods": [],
@@ -263,11 +261,13 @@ Breadcrumb.__docgenInfo = {
263261
}
264262
}
265263
};
264+
var _default = Breadcrumb;
265+
exports["default"] = _default;
266266

267267
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
268268
STORYBOOK_REACT_CLASSES["test/fixtures/multipleExports2/actual.js"] = {
269269
name: "Breadcrumb",
270270
docgenInfo: Breadcrumb.__docgenInfo,
271271
path: "test/fixtures/multipleExports2/actual.js"
272272
};
273-
}
273+
}

‎test/fixtures/reactCreateElement/expected.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Kitten.defaultProps = {
3232
isWide: false,
3333
isLong: false
3434
};
35-
var _default = Kitten;
36-
exports["default"] = _default;
3735
Kitten.__docgenInfo = {
3836
"description": "",
3937
"methods": [],
@@ -63,11 +61,13 @@ Kitten.__docgenInfo = {
6361
}
6462
}
6563
};
64+
var _default = Kitten;
65+
exports["default"] = _default;
6666

6767
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
6868
STORYBOOK_REACT_CLASSES["test/fixtures/reactCreateElement/actual.js"] = {
6969
name: "Kitten",
7070
docgenInfo: Kitten.__docgenInfo,
7171
path: "test/fixtures/reactCreateElement/actual.js"
7272
};
73-
}
73+
}

‎test/fixtures/with-custom-handlers/expected.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ ErrorBox.propTypes = {
5757
/** @deprecated This is the description for prop */
5858
deprecatedProp: _react["default"].PropTypes.number
5959
};
60-
var _default = ErrorBox;
61-
exports["default"] = _default;
6260
ErrorBox.__docgenInfo = {
6361
"description": "",
6462
"methods": [],
@@ -74,11 +72,13 @@ ErrorBox.__docgenInfo = {
7472
}
7573
}
7674
};
75+
var _default = ErrorBox;
76+
exports["default"] = _default;
7777

7878
if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
7979
STORYBOOK_REACT_CLASSES["test/fixtures/with-custom-handlers/actual.js"] = {
8080
name: "ErrorBox",
8181
docgenInfo: ErrorBox.__docgenInfo,
8282
path: "test/fixtures/with-custom-handlers/actual.js"
8383
};
84-
}
84+
}

0 commit comments

Comments
 (0)
Please sign in to comment.