test: coerceTypes: "array" coercion should fail if array length != 1, #158

master
Evgeny Poberezkin 2016-07-27 22:13:46 +01:00
parent ca8c9ab0ac
commit 0630539aa3
No known key found for this signature in database
GPG Key ID: 016D62451CED9D8E
1 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,9 @@ var coercionRules = {
var coercionArrayRules = JSON.parse(JSON.stringify(coercionRules));
coercionArrayRules.string.array = [
{ from: ['abc'], to: 'abc' }
{ from: ['abc'], to: 'abc' },
{ from: ['abc', 'def'], to: undefined },
{ from: [], to: undefined }
];
coercionArrayRules.number.array = [
{ from: [1.5], to: 1.5 }