UNPKG

402 BJavaScriptView Raw
1// test array fields
2
3var assert = require('assert');
4var after = require('after');
5
6var Model = require('../model');
7
8suite('arrays');
9
10// placeholder for the Post model
11var Post = Model({
12 title: String,
13 comments: [{
14 text: String,
15 author: String
16 }]
17});
18
19test('field should be an array', function() {
20 var post = Post();
21
22 assert(post.comments instanceof Array);
23});
24