Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits Rijk committed May 23, 2017
1 parent 4170a3b commit 3c81445
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/tuple.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ function tuple(...predicates) {
gen: () => _.map(predicates, gen),
describe: () => [tuple.name, ...describe(predicates)],
explain: (value, {via}) => {
// const f = new Function('values', `return values.length === ${predicates.length}`);
// return explainPredicate(f, value, {via});
return explainPredicate(values => values.length === predicates.length, value, {via});
const f = new Function('values', `return values.length === ${predicates.length}`);
return explainPredicate(f, value, {via});
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions test/tuple.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ describe('Test the tuple function', () => {
expect(idemPotent('::point', [1.5, 2.5, -0.5])).to.be.true;
});

it('should implement explain', () => {
it.only('should implement explain', () => {
expect(s.explainData('::point', [1.5, 2.5, -0.5])).to.be.null;

expect(s.explainData('::point', [1.5, 2.5])).to.eql({
problems: [
{
path: [],
pred: 'values => values.length === predicates.length',
pred: "function anonymous(values\n/**/) {\nreturn values.length === 3\n}",
val: [1.5, 2.5],
via: ['::point'],
'in': []
Expand Down

0 comments on commit 3c81445

Please sign in to comment.