1 | ;
|
2 |
|
3 | var assert = require('assert');
|
4 | var schema = require('./schema').default;
|
5 |
|
6 | describe('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 |