Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Dec 30, 2016
1 parent d15cba8 commit a1039b7
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@ describe('schema defintion', function () {
})
})

it('providing value', function () {
[{age: Number}, {age: { type: Number }}].forEach(function (rule) {
osom(rule)({age: '23'}).should.be.eql({age: 23})
describe('providing value', function () {
it('Number', function () {
[
{age: Number},
{age: { type: Number }}
].forEach(function (rule) {
osom(rule)({age: '23'}).should.be.eql({age: 23})
})
})

it('Array', function () {
[
{age: Array},
{age: { type: Array }}
].forEach(function (rule) {
osom(rule)({age: ['23']}).should.be.eql({age: ['23']})
})
})
})
})
Expand Down

0 comments on commit a1039b7

Please sign in to comment.