Skip to content

Commit

Permalink
Ammend failed Travis CI checks from commit 11dcafd
Browse files Browse the repository at this point in the history
  • Loading branch information
JLRishe committed Nov 29, 2017
1 parent 11dcafd commit 68bcbb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions source/applySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import values from './values';

/**
* Given a spec hierarchy of objects and/or arrays recursively mapping properties/elements
* to functions, creates a value of the same structure, by mapping each
* property/element to the result of calling its associated function with
* to functions, creates a value of the same structure, by mapping each
* property/element to the result of calling its associated function with
* the supplied arguments.
*
* @func
Expand Down
18 changes: 9 additions & 9 deletions test/applySpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ describe('applySpec', function() {
eq(R.applySpec({ sum: R.add })(1)(2), { sum: 3 });
});

it('works with arrays', function () {
eq(R.applySpec([ R.add(-1), R.identity, R.add(1) ])(3), [2, 3, 4]);
it('works with arrays', function() {
eq(R.applySpec([R.add(-1), R.identity, R.add(1)])(3), [2, 3, 4]);
});
it('works with arrays of objects', function () {

it('works with arrays of objects', function() {
eq(
R.applySpec([
{ type: R.always('add'), value: R.add },
{ type: R.always('multiply'), value: R.multiply }
])(2, 4),
[ { type: 'add', value: 6 }, { type: 'multiply', value: 8 } ]
[{ type: 'add', value: 6 }, { type: 'multiply', value: 8 }]
);
});
it('works with objects containing arrays', function () {

it('works with objects containing arrays', function() {
eq(
R.applySpec({
sums: [ R.add(1), R.add(2), R.add(3) ],
products: [ R.multiply(2), R.multiply(3), R.multiply(4) ]
sums: [R.add(1), R.add(2), R.add(3)],
products: [R.multiply(2), R.multiply(3), R.multiply(4)]
})(3),
{ sums: [4, 5, 6], products: [6, 9, 12] }
);
Expand Down

0 comments on commit 68bcbb6

Please sign in to comment.