Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[test] Added passing test for heterogenous, fixed-length arrays.

  • Loading branch information...
commit 5d56b5c4b6ddda296b25e578190ca8b8e08f5f13 1 parent ba7a8b4
@indexzero indexzero authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/validator-test.js
View
10 test/validator-test.js
@@ -184,6 +184,15 @@ vows.describe('revalidator', {
pattern: /[a-z ]+/
}
},
+ tuple: {
+ type: 'array',
+ minItems: 2,
+ maxItems: 2,
+ items: {
+ type: ['string', 'number']
+ }
+ },
+
author: { type: 'string', pattern: /^[\w ]+$/i, required: true},
published: { type: 'boolean', 'default': false },
category: { type: 'string' },
@@ -203,6 +212,7 @@ vows.describe('revalidator', {
date: '2012-02-04',
body: "And I will pwn your codex.",
tags: ['energy drinks', 'code'],
+ tuple: ['string0', 103],
author: 'cloudhead',
published: true,
category: 'misc',
Please sign in to comment.
Something went wrong with that request. Please try again.