Skip to content

Commit

Permalink
Implement explain-data for every and everyKv
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits Rijk committed May 31, 2017
1 parent 73c8d40 commit e55bf5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions test/every.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ describe('Test the every function', () => {
s.def('::vnum3', s.every(isNumber, {kind: isVector, count: 3, distinct: true}));
});

it('should return a spec for a collection', () => {
expect(s.isValid('::vnum3', [1, 2, 3])).to.be.true;
describe('should handle valid input', () => {
it('should return a spec for a collection', () => {
expect(s.isValid('::vnum3', [1, 2, 3])).to.be.true;
});

it('explainData should return null', () => {
expect(s.explainData('::vnum3', [1, 2, 3])).to.be.null;
});
});

it('should implement describe', () => {
Expand Down
10 changes: 8 additions & 2 deletions test/everyKv.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ describe('Test the everyKv function', () => {
s.def('::scores', s.everyKv(isString, isInteger));
});

it('should return a spec for everyKv', () => {
expect(s.isValid('::scores', {'Sally': 1000, 'Joe': 500})).to.be.true;
describe('should handle valid input', () => {
it('should return a spec for everyKv', () => {
expect(s.isValid('::scores', {'Sally': 1000, 'Joe': 500})).to.be.true;
});

it('explainData should return null', () => {
expect(s.explainData('::scores', {'Sally': 1000, 'Joe': 500})).to.be.null;
});
});

it('should implement describe', () => {
Expand Down

0 comments on commit e55bf5a

Please sign in to comment.