@ukhomeoffice/cop-react-form-renderer 6.11.1 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CheckYourAnswers/Answer.js +1 -1
- package/dist/components/CheckYourAnswers/CheckYourAnswers.js +6 -2
- package/dist/components/CheckYourAnswers/CheckYourAnswers.test.js +131 -50
- package/dist/components/CollectionSummary/CollectionSummary.js +6 -4
- package/dist/components/CollectionSummary/CollectionSummary.scss +5 -0
- package/dist/components/CollectionSummary/CollectionSummary.test.js +60 -36
- package/dist/components/CollectionSummary/RenderListView.js +7 -4
- package/dist/components/CollectionSummary/SummaryCard.js +6 -4
- package/dist/components/CollectionSummary/SummaryCard.scss +6 -0
- package/dist/components/CollectionSummary/SummaryCard.test.js +5 -5
- package/dist/components/CollectionSummary/SummaryCardDetails.js +3 -2
- package/dist/components/CollectionSummary/SummaryCardDetails.scss +2 -0
- package/dist/components/FormComponent/FormComponent.js +1 -1
- package/dist/components/FormPage/FormPage.js +19 -7
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.js +25 -13
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.test.js +59 -1
- package/dist/components/FormRenderer/onPageAction.js +5 -1
- package/dist/json/actions.json +17 -0
- package/dist/json/actionsNoSave.json +17 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.js +7 -4
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.test.js +39 -0
- package/dist/utils/CheckYourAnswers/showComponentCYA.js +1 -1
- package/dist/utils/Data/deleteValues.js +22 -0
- package/dist/utils/Data/deleteValues.test.js +57 -0
- package/dist/utils/Data/getAutocompleteSource.test.js +14 -5
- package/dist/utils/Data/getOptions.js +2 -1
- package/dist/utils/Data/getOptions.test.js +26 -8
- package/dist/utils/Data/index.js +2 -0
- package/dist/utils/Operate/deleteValueInFormData.js +26 -0
- package/dist/utils/Operate/deleteValueInFormData.test.js +60 -0
- package/dist/utils/Operate/runPageOperations.js +2 -0
- package/dist/utils/Validate/additional/index.js +4 -1
- package/dist/utils/Validate/additional/index.test.js +66 -0
- package/dist/utils/Validate/additional/mustBeOneOf.js +21 -0
- package/dist/utils/Validate/additional/mustBeOneOf.test.js +36 -0
- package/package.json +1 -1
|
@@ -16,10 +16,12 @@ describe('utils', function () {
|
|
|
16
16
|
var CONFIG = {
|
|
17
17
|
options: [{
|
|
18
18
|
value: 'a',
|
|
19
|
-
label: 'Alpha'
|
|
19
|
+
label: 'Alpha',
|
|
20
|
+
hint: ''
|
|
20
21
|
}, {
|
|
21
22
|
value: 'b',
|
|
22
|
-
label: 'Bravo'
|
|
23
|
+
label: 'Bravo',
|
|
24
|
+
hint: ''
|
|
23
25
|
}]
|
|
24
26
|
};
|
|
25
27
|
(0, _getOptions.default)(CONFIG, function (options) {
|
|
@@ -31,10 +33,12 @@ describe('utils', function () {
|
|
|
31
33
|
data: {
|
|
32
34
|
options: [{
|
|
33
35
|
value: 'a',
|
|
34
|
-
label: 'Alpha'
|
|
36
|
+
label: 'Alpha',
|
|
37
|
+
hint: ''
|
|
35
38
|
}, {
|
|
36
39
|
value: 'b',
|
|
37
|
-
label: 'Bravo'
|
|
40
|
+
label: 'Bravo',
|
|
41
|
+
hint: ''
|
|
38
42
|
}]
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -46,10 +50,12 @@ describe('utils', function () {
|
|
|
46
50
|
var CONFIG = {
|
|
47
51
|
options: [{
|
|
48
52
|
value: 'a',
|
|
49
|
-
label: 'Alpha'
|
|
53
|
+
label: 'Alpha',
|
|
54
|
+
hint: ''
|
|
50
55
|
}, {
|
|
51
56
|
value: 'b',
|
|
52
|
-
label: 'Bravo'
|
|
57
|
+
label: 'Bravo',
|
|
58
|
+
hint: ''
|
|
53
59
|
}],
|
|
54
60
|
data: {
|
|
55
61
|
options: [{
|
|
@@ -71,6 +77,7 @@ describe('utils', function () {
|
|
|
71
77
|
options: [{
|
|
72
78
|
value: 'a',
|
|
73
79
|
label: 'Alpha',
|
|
80
|
+
hint: '',
|
|
74
81
|
show_when: {
|
|
75
82
|
field: 'other',
|
|
76
83
|
op: 'eq',
|
|
@@ -79,6 +86,7 @@ describe('utils', function () {
|
|
|
79
86
|
}, {
|
|
80
87
|
value: 'b',
|
|
81
88
|
label: 'Bravo',
|
|
89
|
+
hint: '',
|
|
82
90
|
show_when: {
|
|
83
91
|
field: 'other',
|
|
84
92
|
op: 'neq',
|
|
@@ -99,6 +107,7 @@ describe('utils', function () {
|
|
|
99
107
|
options: [{
|
|
100
108
|
value: 'a',
|
|
101
109
|
label: 'Alpha',
|
|
110
|
+
hint: '',
|
|
102
111
|
show_when: {
|
|
103
112
|
type: 'or',
|
|
104
113
|
conditions: [{
|
|
@@ -114,6 +123,7 @@ describe('utils', function () {
|
|
|
114
123
|
}, {
|
|
115
124
|
value: 'b',
|
|
116
125
|
label: 'Bravo',
|
|
126
|
+
hint: '',
|
|
117
127
|
show_when: {
|
|
118
128
|
type: 'or',
|
|
119
129
|
conditions: [{
|
|
@@ -152,16 +162,19 @@ describe('utils', function () {
|
|
|
152
162
|
options: [{
|
|
153
163
|
id: 1,
|
|
154
164
|
description: 'First refdata item',
|
|
165
|
+
hint: '',
|
|
155
166
|
value: 'firstValue',
|
|
156
167
|
label: 'First label'
|
|
157
168
|
}, {
|
|
158
169
|
id: 2,
|
|
159
170
|
description: 'Second refdata item',
|
|
171
|
+
hint: '',
|
|
160
172
|
value: 'secondValue',
|
|
161
173
|
label: 'Second label'
|
|
162
174
|
}, {
|
|
163
175
|
id: 3,
|
|
164
176
|
description: 'Third refdata item',
|
|
177
|
+
hint: '',
|
|
165
178
|
value: 'thirdValue',
|
|
166
179
|
label: 'Third label'
|
|
167
180
|
}]
|
|
@@ -169,11 +182,13 @@ describe('utils', function () {
|
|
|
169
182
|
var MERGED_CONFIG = [{
|
|
170
183
|
id: 1,
|
|
171
184
|
description: 'First refdata item',
|
|
185
|
+
hint: '',
|
|
172
186
|
value: 'firstValue',
|
|
173
187
|
label: 'First label'
|
|
174
188
|
}, {
|
|
175
189
|
id: 2,
|
|
176
190
|
description: 'Second refdata item',
|
|
191
|
+
hint: '',
|
|
177
192
|
value: 'secondValue',
|
|
178
193
|
nested: [{
|
|
179
194
|
value: 'a',
|
|
@@ -183,6 +198,7 @@ describe('utils', function () {
|
|
|
183
198
|
}, {
|
|
184
199
|
id: 3,
|
|
185
200
|
description: 'Third refdata item',
|
|
201
|
+
hint: '',
|
|
186
202
|
value: 'thirdValue',
|
|
187
203
|
label: 'Third label'
|
|
188
204
|
}];
|
|
@@ -196,11 +212,13 @@ describe('utils', function () {
|
|
|
196
212
|
options: [{
|
|
197
213
|
value: 'a',
|
|
198
214
|
label: 'Alpha',
|
|
199
|
-
description: 'first'
|
|
215
|
+
description: 'first',
|
|
216
|
+
hint: ''
|
|
200
217
|
}, {
|
|
201
218
|
value: 'b',
|
|
202
219
|
label: 'Bravo',
|
|
203
|
-
description: 'second'
|
|
220
|
+
description: 'second',
|
|
221
|
+
hint: ''
|
|
204
222
|
}]
|
|
205
223
|
};
|
|
206
224
|
(0, _getOptions.default)(CONFIG, function (options) {
|
package/dist/utils/Data/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var _getDataPath = _interopRequireDefault(require("./getDataPath"));
|
|
|
10
10
|
var _getOptions = _interopRequireDefault(require("./getOptions"));
|
|
11
11
|
var _getSourceData = _interopRequireDefault(require("./getSourceData"));
|
|
12
12
|
var _refDataToOptions = _interopRequireDefault(require("./refDataToOptions"));
|
|
13
|
+
var _deleteValues = _interopRequireDefault(require("./deleteValues"));
|
|
13
14
|
var _setDataItem = _interopRequireDefault(require("./setDataItem"));
|
|
14
15
|
var _setupFormData = _interopRequireDefault(require("./setupFormData"));
|
|
15
16
|
var _setupRefDataUrlForComponent = _interopRequireDefault(require("./setupRefDataUrlForComponent"));
|
|
@@ -26,6 +27,7 @@ var Data = {
|
|
|
26
27
|
setupUrl: _setupRefDataUrlForComponent.default,
|
|
27
28
|
toOptions: _refDataToOptions.default
|
|
28
29
|
},
|
|
30
|
+
deleteValues: _deleteValues.default,
|
|
29
31
|
setDataItem: _setDataItem.default,
|
|
30
32
|
setupForm: _setupFormData.default
|
|
31
33
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Simple operation to delete a value in the form data.
|
|
9
|
+
* @param {object} config The operation config.
|
|
10
|
+
* @param {object} data The page's formData.
|
|
11
|
+
* @param {function} onChange The page's onChange handler.
|
|
12
|
+
*/
|
|
13
|
+
var deleteValueInFormData = function deleteValueInFormData(config, data, onChange) {
|
|
14
|
+
var node = data;
|
|
15
|
+
if (config !== null && config !== void 0 && config.field && config !== null && config !== void 0 && config.component) {
|
|
16
|
+
delete node[config.field];
|
|
17
|
+
onChange({
|
|
18
|
+
target: {
|
|
19
|
+
name: config.field,
|
|
20
|
+
value: null,
|
|
21
|
+
component: config.component
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = deleteValueInFormData;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _deleteValueInFormData = _interopRequireDefault(require("./deleteValueInFormData"));
|
|
4
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5
|
+
describe('Utils.Operate.deleteValueInFormData', function () {
|
|
6
|
+
var ON_CHANGE = function ON_CHANGE() {};
|
|
7
|
+
it('Should delete value from data', function () {
|
|
8
|
+
var CONFIG = {
|
|
9
|
+
field: 'a',
|
|
10
|
+
component: 'A'
|
|
11
|
+
};
|
|
12
|
+
var DATA = {
|
|
13
|
+
a: '1',
|
|
14
|
+
b: '2'
|
|
15
|
+
};
|
|
16
|
+
(0, _deleteValueInFormData.default)(CONFIG, DATA, ON_CHANGE);
|
|
17
|
+
expect(DATA).toEqual({
|
|
18
|
+
b: '2'
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
it('Should do nothing if value is absent', function () {
|
|
22
|
+
var CONFIG = {
|
|
23
|
+
field: 'c',
|
|
24
|
+
component: 'C'
|
|
25
|
+
};
|
|
26
|
+
var DATA = {
|
|
27
|
+
a: '1',
|
|
28
|
+
b: '2'
|
|
29
|
+
};
|
|
30
|
+
(0, _deleteValueInFormData.default)(CONFIG, DATA, ON_CHANGE);
|
|
31
|
+
expect(DATA).toEqual({
|
|
32
|
+
a: '1',
|
|
33
|
+
b: '2'
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it('Should do nothing if config is null', function () {
|
|
37
|
+
var CONFIG = null;
|
|
38
|
+
var DATA = {
|
|
39
|
+
a: '1',
|
|
40
|
+
b: '2'
|
|
41
|
+
};
|
|
42
|
+
(0, _deleteValueInFormData.default)(CONFIG, DATA, ON_CHANGE);
|
|
43
|
+
expect(DATA).toEqual({
|
|
44
|
+
a: '1',
|
|
45
|
+
b: '2'
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
it('Should do nothing if config is empty', function () {
|
|
49
|
+
var CONFIG = {};
|
|
50
|
+
var DATA = {
|
|
51
|
+
a: '1',
|
|
52
|
+
b: '2'
|
|
53
|
+
};
|
|
54
|
+
(0, _deleteValueInFormData.default)(CONFIG, DATA, ON_CHANGE);
|
|
55
|
+
expect(DATA).toEqual({
|
|
56
|
+
a: '1',
|
|
57
|
+
b: '2'
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -9,6 +9,7 @@ var _checkValueIsTruthy = _interopRequireDefault(require("./checkValueIsTruthy")
|
|
|
9
9
|
var _getIndexOfMatchingValueIn = _interopRequireDefault(require("./getIndexOfMatchingValueIn"));
|
|
10
10
|
var _persistValueInFormData = _interopRequireDefault(require("./persistValueInFormData"));
|
|
11
11
|
var _setValueInFormData = _interopRequireDefault(require("./setValueInFormData"));
|
|
12
|
+
var _deleteValueInFormData = _interopRequireDefault(require("./deleteValueInFormData"));
|
|
12
13
|
var _shouldRun = _interopRequireDefault(require("./shouldRun"));
|
|
13
14
|
var _setDataItem = _interopRequireDefault(require("../Data/setDataItem"));
|
|
14
15
|
var _getFirstOf = _interopRequireDefault(require("./getFirstOf"));
|
|
@@ -23,6 +24,7 @@ var functions = {
|
|
|
23
24
|
getIndexOfMatchingValueIn: _getIndexOfMatchingValueIn.default,
|
|
24
25
|
persistValueInFormData: _persistValueInFormData.default,
|
|
25
26
|
setValueInFormData: _setValueInFormData.default,
|
|
27
|
+
deleteValueInFormData: _deleteValueInFormData.default,
|
|
26
28
|
getLength: _getLength.default,
|
|
27
29
|
getFirstOf: _getFirstOf.default
|
|
28
30
|
};
|
|
@@ -15,6 +15,7 @@ var _mustBeShorterThan = _interopRequireDefault(require("./mustBeShorterThan"));
|
|
|
15
15
|
var _mustBeGreaterThan = _interopRequireDefault(require("./mustBeGreaterThan"));
|
|
16
16
|
var _mustBeLessThan = _interopRequireDefault(require("./mustBeLessThan"));
|
|
17
17
|
var _mustBeNumbersOnly = _interopRequireDefault(require("./mustBeNumbersOnly"));
|
|
18
|
+
var _mustBeOneOf = _interopRequireDefault(require("./mustBeOneOf"));
|
|
18
19
|
var _mustBeUniqueInCollection = _interopRequireDefault(require("./mustBeUniqueInCollection"));
|
|
19
20
|
var _mustEnterAtLeastOne = _interopRequireDefault(require("./mustEnterAtLeastOne"));
|
|
20
21
|
var _mustHaveLessThanDecimalPlaces = _interopRequireDefault(require("./mustHaveLessThanDecimalPlaces"));
|
|
@@ -34,6 +35,7 @@ var functions = {
|
|
|
34
35
|
mustBeLessThan: _mustBeLessThan.default,
|
|
35
36
|
mustBeLongerThan: _mustBeLongerThan.default,
|
|
36
37
|
mustBeNumbersOnly: _mustBeNumbersOnly.default,
|
|
38
|
+
mustBeOneOf: _mustBeOneOf.default,
|
|
37
39
|
mustBeShorterThan: _mustBeShorterThan.default,
|
|
38
40
|
mustBeUniqueInCollection: _mustBeUniqueInCollection.default,
|
|
39
41
|
mustEnterAtLeastOne: _mustEnterAtLeastOne.default,
|
|
@@ -43,8 +45,9 @@ var functions = {
|
|
|
43
45
|
};
|
|
44
46
|
var additionalValidation = function additionalValidation(value, config, component, formData) {
|
|
45
47
|
var fn = functions[config.function];
|
|
48
|
+
var valueToValidate = config.objectValueToUse ? value[config.objectValueToUse] : value;
|
|
46
49
|
if (typeof fn === 'function') {
|
|
47
|
-
return fn(
|
|
50
|
+
return fn(valueToValidate, config, component, formData) ? undefined : config.message;
|
|
48
51
|
}
|
|
49
52
|
return undefined;
|
|
50
53
|
};
|
|
@@ -58,6 +58,72 @@ describe('utils', function () {
|
|
|
58
58
|
var VALUE = (0, _dayjs.default)().add(150, 'day').format(_utils.DATE_FORMAT);
|
|
59
59
|
expect((0, _index.default)(COMPONENT, VALUE)).toEqual(undefined);
|
|
60
60
|
});
|
|
61
|
+
it('should apply optional validators that fail when the value is an object', function () {
|
|
62
|
+
var COMPONENT = {
|
|
63
|
+
fieldId: 'container',
|
|
64
|
+
components: [{
|
|
65
|
+
id: 'eventDate',
|
|
66
|
+
fieldId: 'eventDate'
|
|
67
|
+
}, {
|
|
68
|
+
id: 'eventTime',
|
|
69
|
+
fieldId: 'eventTime'
|
|
70
|
+
}],
|
|
71
|
+
additionalValidation: [{
|
|
72
|
+
function: 'mustBeEarlierDateTime',
|
|
73
|
+
date: 'eventDate',
|
|
74
|
+
time: 'eventTime',
|
|
75
|
+
message: 'The date and time cannot be in the future'
|
|
76
|
+
}]
|
|
77
|
+
};
|
|
78
|
+
var VALUE = {
|
|
79
|
+
container: {
|
|
80
|
+
eventDate: '01-07-4024',
|
|
81
|
+
eventTime: '1:1'
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
expect((0, _index.default)(COMPONENT, VALUE)).toEqual('The date and time cannot be in the future');
|
|
85
|
+
});
|
|
86
|
+
it('should apply optional validators that pass when the value is an object', function () {
|
|
87
|
+
var COMPONENT = {
|
|
88
|
+
fieldId: 'container',
|
|
89
|
+
components: [{
|
|
90
|
+
id: 'eventDate',
|
|
91
|
+
fieldId: 'eventDate'
|
|
92
|
+
}, {
|
|
93
|
+
id: 'eventTime',
|
|
94
|
+
fieldId: 'eventTime'
|
|
95
|
+
}],
|
|
96
|
+
additionalValidation: [{
|
|
97
|
+
function: 'mustBeEarlierDateTime',
|
|
98
|
+
date: 'eventDate',
|
|
99
|
+
time: 'eventTime',
|
|
100
|
+
message: 'The date and time cannot be in the future'
|
|
101
|
+
}]
|
|
102
|
+
};
|
|
103
|
+
var VALUE = {
|
|
104
|
+
container: {
|
|
105
|
+
eventDate: '01-07-1024',
|
|
106
|
+
eventTime: '1:1'
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
expect((0, _index.default)(COMPONENT, VALUE)).toEqual(undefined);
|
|
110
|
+
});
|
|
111
|
+
it('should apply optional validators when the value is within an object', function () {
|
|
112
|
+
var COMPONENT = {
|
|
113
|
+
additionalValidation: [{
|
|
114
|
+
function: 'mustBeAfter',
|
|
115
|
+
value: 3,
|
|
116
|
+
unit: 'day',
|
|
117
|
+
objectValueToUse: "date",
|
|
118
|
+
message: 'Date must be more than 3 days in the future'
|
|
119
|
+
}]
|
|
120
|
+
};
|
|
121
|
+
var VALUE = {
|
|
122
|
+
testValue: "",
|
|
123
|
+
date: (0, _dayjs.default)().add(1, 'day').format(_utils.DATE_FORMAT)
|
|
124
|
+
};
|
|
125
|
+
expect((0, _index.default)(COMPONENT, VALUE)).toEqual('Date must be more than 3 days in the future');
|
|
126
|
+
});
|
|
61
127
|
});
|
|
62
128
|
});
|
|
63
129
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Function returns true if the string parameter is contained in the passed in array.
|
|
9
|
+
* @param {string} string - the string to check.
|
|
10
|
+
* @param {array} config.array - the array that the string will be checked against.
|
|
11
|
+
* @returns true if string is contained in config.array, false if not.
|
|
12
|
+
*/
|
|
13
|
+
var mustBeOneOf = function mustBeOneOf(string, config) {
|
|
14
|
+
if (!string) {
|
|
15
|
+
// null, undefined and empty strings should be picked up by the required flag
|
|
16
|
+
// and not considered here as they would be valid for optional fields.
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return config.array.includes(string);
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = mustBeOneOf;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _mustBeOneOf = _interopRequireDefault(require("./mustBeOneOf"));
|
|
4
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5
|
+
describe('utils', function () {
|
|
6
|
+
describe('Validate', function () {
|
|
7
|
+
describe('additional', function () {
|
|
8
|
+
describe('mustBeShorterThan', function () {
|
|
9
|
+
test('should return true given the string is in the array', function () {
|
|
10
|
+
var result = (0, _mustBeOneOf.default)('test2', {
|
|
11
|
+
array: ["test1", "test2", "test3", "test4"]
|
|
12
|
+
});
|
|
13
|
+
expect(result).toEqual(true);
|
|
14
|
+
});
|
|
15
|
+
test('should return false given the string is not in the array', function () {
|
|
16
|
+
var result = (0, _mustBeOneOf.default)('test5', {
|
|
17
|
+
array: ["test1", "test2", "test3", "test4"]
|
|
18
|
+
});
|
|
19
|
+
expect(result).toEqual(false);
|
|
20
|
+
});
|
|
21
|
+
test('should return false given the array is empty', function () {
|
|
22
|
+
var result = (0, _mustBeOneOf.default)('test1', {
|
|
23
|
+
array: []
|
|
24
|
+
});
|
|
25
|
+
expect(result).toEqual(false);
|
|
26
|
+
});
|
|
27
|
+
test('should return false when only the partial string is in the array', function () {
|
|
28
|
+
var result = (0, _mustBeOneOf.default)('test', {
|
|
29
|
+
array: ["test1", "test2", "test3", "test4"]
|
|
30
|
+
});
|
|
31
|
+
expect(result).toEqual(false);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|