UNPKG

479 BJavaScriptView Raw
1'use strict';
2
3var assert = require('assert');
4var schema = require('./schema').default;
5
6describe('Schema', function () {
7 it('converts an object entry to validation', function () {
8 var entry = {
9 a: 'foo'
10 };
11 var result = schema({ entry: entry });
12 var expected = {
13 a: {
14 type: ['array', 'string'],
15 items: {
16 type: 'string'
17 }
18 }
19 };
20
21 assert.deepEqual(result.properties.paths.properties, expected);
22 });
23});
\No newline at end of file