-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snapshot tests for argtype inferring
- Loading branch information
Showing
34 changed files
with
3,119 additions
and
23 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
addons/docs/src/frameworks/react/__testfixtures__/10017-ts-union/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 10017-ts-union 1`] = ` | ||
Object { | ||
"icon": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": "specify icon=\\"search\\" or icon={IconComponent}", | ||
"name": "icon", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "union", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "union", | ||
"raw": "React.ReactNode | string", | ||
"required": true, | ||
"value": Array [ | ||
Object { | ||
"name": "other", | ||
"raw": "React.ReactNode", | ||
"value": "ReactReactNode", | ||
}, | ||
Object { | ||
"name": "string", | ||
}, | ||
], | ||
}, | ||
}, | ||
} | ||
`; |
26 changes: 26 additions & 0 deletions
26
...docs/src/frameworks/react/__testfixtures__/10278-ts-multiple-components/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 10278-ts-multiple-components 1`] = ` | ||
Object { | ||
"aProperty": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": "", | ||
"name": "aProperty", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "any", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "other", | ||
"required": true, | ||
"value": "any", | ||
}, | ||
}, | ||
} | ||
`; |
127 changes: 127 additions & 0 deletions
127
addons/docs/src/frameworks/react/__testfixtures__/8140-js-prop-types-oneof/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8140-js-prop-types-oneof 1`] = ` | ||
Object { | ||
"blank": Object { | ||
"control": Object { | ||
"type": "boolean", | ||
}, | ||
"description": "No background or border if static alert", | ||
"name": "blank", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "bool", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "boolean", | ||
"required": false, | ||
}, | ||
}, | ||
"icon": Object { | ||
"control": Object { | ||
"type": "text", | ||
}, | ||
"description": "Allows icon override, accepts material icon name", | ||
"name": "icon", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "string", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "string", | ||
"required": false, | ||
}, | ||
}, | ||
"message": Object { | ||
"control": Object { | ||
"type": "text", | ||
}, | ||
"description": "", | ||
"name": "message", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "string", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "string", | ||
"required": true, | ||
}, | ||
}, | ||
"mode": Object { | ||
"control": Object { | ||
"type": "radio", | ||
}, | ||
"description": "", | ||
"name": "mode", | ||
"options": Array [ | ||
"static", | ||
"timed", | ||
], | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'static'", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "'static' | 'timed'", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "enum", | ||
"required": false, | ||
"value": Array [ | ||
"static", | ||
"timed", | ||
], | ||
}, | ||
}, | ||
"type": Object { | ||
"control": Object { | ||
"type": "radio", | ||
}, | ||
"description": "", | ||
"name": "type", | ||
"options": Array [ | ||
"success", | ||
"warning", | ||
"error", | ||
"primary", | ||
], | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'warning'", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "'success' | 'warning' | 'error' | 'primary'", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "enum", | ||
"required": false, | ||
"value": Array [ | ||
"success", | ||
"warning", | ||
"error", | ||
"primary", | ||
], | ||
}, | ||
}, | ||
} | ||
`; |
27 changes: 27 additions & 0 deletions
27
addons/docs/src/frameworks/react/__testfixtures__/8143-ts-imported-types/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8143-ts-imported-types 1`] = ` | ||
Object { | ||
"bar": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": "", | ||
"name": "bar", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "Foo['bar']", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "other", | ||
"raw": "Foo['bar']", | ||
"required": true, | ||
"value": "Foo['bar']", | ||
}, | ||
}, | ||
} | ||
`; |
27 changes: 27 additions & 0 deletions
27
...ns/docs/src/frameworks/react/__testfixtures__/8143-ts-react-fc-generics/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8143-ts-react-fc-generics 1`] = ` | ||
Object { | ||
"padding": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": undefined, | ||
"name": "padding", | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'0'", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "unknown", | ||
}, | ||
}, | ||
"type": Object { | ||
"required": false, | ||
}, | ||
}, | ||
} | ||
`; |
3 changes: 3 additions & 0 deletions
3
addons/docs/src/frameworks/react/__testfixtures__/8279-js-styled-docgen/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8279-js-styled-docgen 1`] = `Object {}`; |
25 changes: 25 additions & 0 deletions
25
...ns/docs/src/frameworks/react/__testfixtures__/8428-js-static-prop-types/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8428-js-static-prop-types 1`] = ` | ||
Object { | ||
"test": Object { | ||
"control": Object { | ||
"type": "text", | ||
}, | ||
"description": "Please work...", | ||
"name": "test", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "string", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "string", | ||
"required": false, | ||
}, | ||
}, | ||
} | ||
`; |
25 changes: 25 additions & 0 deletions
25
...ns/docs/src/frameworks/react/__testfixtures__/8663-js-styled-components/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8663-js-styled-components 1`] = ` | ||
Object { | ||
"bg": Object { | ||
"control": Object { | ||
"type": "text", | ||
}, | ||
"description": "", | ||
"name": "bg", | ||
"table": Object { | ||
"defaultValue": null, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "string", | ||
}, | ||
}, | ||
"type": Object { | ||
"name": "string", | ||
"required": false, | ||
}, | ||
}, | ||
} | ||
`; |
27 changes: 27 additions & 0 deletions
27
addons/docs/src/frameworks/react/__testfixtures__/8740-ts-multi-props/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8740-ts-multi-props 1`] = ` | ||
Object { | ||
"size": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": undefined, | ||
"name": "size", | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'a'", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "unknown", | ||
}, | ||
}, | ||
"type": Object { | ||
"required": false, | ||
}, | ||
}, | ||
} | ||
`; |
48 changes: 48 additions & 0 deletions
48
addons/docs/src/frameworks/react/__testfixtures__/8894-9511-ts-forward-ref/argTypes.snapshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`react component properties 8894-9511-ts-forward-ref 1`] = ` | ||
Object { | ||
"disabled": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": undefined, | ||
"name": "disabled", | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "false", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "unknown", | ||
}, | ||
}, | ||
"type": Object { | ||
"required": false, | ||
}, | ||
}, | ||
"variant": Object { | ||
"control": Object { | ||
"type": "object", | ||
}, | ||
"description": undefined, | ||
"name": "variant", | ||
"table": Object { | ||
"defaultValue": Object { | ||
"detail": undefined, | ||
"summary": "'small'", | ||
}, | ||
"jsDocTags": undefined, | ||
"type": Object { | ||
"detail": undefined, | ||
"summary": "unknown", | ||
}, | ||
}, | ||
"type": Object { | ||
"required": false, | ||
}, | ||
}, | ||
} | ||
`; |
Oops, something went wrong.