Skip to content

Commit

Permalink
All tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits Rijk committed May 18, 2017
1 parent d2b28f2 commit 97e8131
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion TODO
Expand Up @@ -4,7 +4,6 @@ Still to implement:
- implement clojure.spec.test
- instrument
- ...
- 'Real' parsing

Other TODO:

Expand Down
4 changes: 2 additions & 2 deletions lib/and.js
Expand Up @@ -8,11 +8,11 @@ const describe = require('./util/describe');

function and(...predicates) {
return {
conform: value => {
conform: (value, unwrap) => {
let allValid = true;

const results = _.reduce(predicates, (result, p) => {
const val = conform(p, result);
const val = conform(p, result, unwrap);

allValid = allValid && (val !== invalidString);

Expand Down
6 changes: 3 additions & 3 deletions test/star.js
Expand Up @@ -11,11 +11,11 @@ const {isBoolean, isInteger, isOdd, isString} = s.utils;
describe('Test the star (*) function', () => {
s.def('::odd?', s.and(isInteger, isOdd));
const odds = s.star('::odd?');
xit('should return the value', () => {

it('should return the value', () => {
expect(s.conform(odds, [1, 3])).to.eql([1, 3]);
});

it('should accept an empty value sequence', () => {
expect(s.conform(odds, [])).to.eql([]);
});
Expand Down

0 comments on commit 97e8131

Please sign in to comment.