/
Action.spec.ts.snap
145 lines (130 loc) · 4.36 KB
/
Action.spec.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Action isAction should recognize non-Action objects 1`] = `"Not a Action object"`;
exports[`Action permissions should throw if empty permissions are provided 1`] = `"Action 'example' has one or more empty permission definitions"`;
exports[`Action should have a description 1`] = `"Missing description for action 'example'"`;
exports[`Action should have a name 1`] = `"Missing action name"`;
exports[`Action should have a valid input definition 1`] = `"Action 'example' has an invalid input definition"`;
exports[`Action should have a valid output definition 1`] = `"Action 'example' has an invalid output definition"`;
exports[`Action should have a valid resolve function 1`] = `"Action 'example' needs a resolve function"`;
exports[`Action should have valid input and output definitions when generated via a function 1`] = `"Input definition function for action 'example' does not return a map"`;
exports[`Action should have valid input and output definitions when generated via a function 2`] = `"Output definition function for action 'example' does not return a map"`;
exports[`Action should have valid input data types 1`] = `"Missing input type for action 'example'"`;
exports[`Action should have valid output data types 1`] = `"Missing output type for action 'example'"`;
exports[`Action should return input and output params 1`] = `
Object {
"type": ObjectDataType {
"_attributesMap": Object {
"about": Object {
"description": "Just some description",
"type": [Function],
},
"firstName": Object {
"defaultValue": [Function],
"description": "First name",
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
"lastName": Object {
"description": "Last name",
"required": true,
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
},
"description": "do something",
"name": "input",
"validate": [Function],
},
}
`;
exports[`Action should return input and output params 2`] = `
Object {
"type": ObjectDataType {
"_attributesMap": Object {
"luckyNumber": Object {
"description": "Lucky number",
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
},
"description": "do something",
"name": "output",
"validate": [Function],
},
}
`;
exports[`Action should return input and output params 3`] = `
Object {
"about": Object {
"description": "Just some description",
"name": "about",
"required": false,
"type": ObjectDataType {
"_attributesMap": Object {
"favouriteActor": Object {
"description": "One more description",
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
},
"description": "Just some description",
"name": "about",
"validate": [Function],
},
},
"firstName": Object {
"defaultValue": [Function],
"description": "First name",
"name": "firstName",
"required": true,
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
"lastName": Object {
"description": "Last name",
"name": "lastName",
"required": true,
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
}
`;
exports[`Action should return input and output params 4`] = `
Object {
"favouriteActor": Object {
"description": "One more description",
"name": "favouriteActor",
"required": false,
"type": DataType {
"description": "Data type representing text values",
"mock": [Function],
"name": "DataTypeString",
"validate": [Function],
},
},
}
`;