Skip to content

Commit

Permalink
Add casting case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Nov 4, 2016
1 parent bbc666a commit 1ab1a43
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/index.js
Expand Up @@ -103,7 +103,13 @@ describe('schema defintion', function () {
})
})

describe('support casting (by default)', function () {
describe('support casting', function () {
it('enable (by default)', function () {
var schema = { age: Array }
var validator = osom(schema)
validator({age: '23'}).should.be.eql({age: ['23']})
})

it('disable explicit', function () {
var schema = {
age: {
Expand Down

0 comments on commit 1ab1a43

Please sign in to comment.