From f4be88357c865025f31d40922649b49a03fad709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 4 May 2015 15:00:06 +0200 Subject: [PATCH] Add unit-test for "array" type Add a unit-test to capture the fact that a property type can be specified as `type: 'array'`. --- test/model-definition.test.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/model-definition.test.js b/test/model-definition.test.js index 588a15ec..2f480946 100644 --- a/test/model-definition.test.js +++ b/test/model-definition.test.js @@ -390,5 +390,15 @@ describe('ModelDefinition class', function () { done(); }); }); + + it('should support "array" type shortcut', function() { + var Model = memory.createModel('TwoArrays', { + regular: Array, + sugar: 'array' + }); + + var props = Model.definition.properties; + props.regular.type.should.equal(props.sugar.type); + }); });