From 0630539aa382bc3434c9906488ec2383b9585445 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Wed, 27 Jul 2016 22:13:46 +0100 Subject: [PATCH] test: coerceTypes: "array" coercion should fail if array length != 1, #158 --- spec/coercion.spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/coercion.spec.js b/spec/coercion.spec.js index 35a2225..a00e102 100644 --- a/spec/coercion.spec.js +++ b/spec/coercion.spec.js @@ -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 }