Skip to content

Commit

Permalink
Fix code coverage with ignore statements
Browse files Browse the repository at this point in the history
Ignoring the UMD bundle and curry functions imported from @most/prelude.

Temporarily hard-coded lack of an alternative.
  • Loading branch information
flagello committed Apr 30, 2017
1 parent 566c71f commit 8c3f25b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions flyd.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
(function (global, factory) {
/* istanbul ignore next */
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define('flyd', factory) :
(global.flyd = factory());
}(this, (function () { 'use strict';

/** @license MIT License (c) copyright 2010-2016 original author or authors */

/* istanbul ignore next */
// Non-mutating array operations

// cons :: a -> [a] -> [a]
// a with x prepended
// curry2 :: ((a, b) -> c) -> (a -> b -> c)
function curry2 (f) {
/* istanbul ignore next */
function curried (a, b) {
switch (arguments.length) {
case 0: return curried
Expand All @@ -22,10 +25,13 @@
return curried
}

/* istanbul ignore next */
// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d)
function curry3 (f) {
/* istanbul ignore next */
function curried (a, b, c) { // eslint-disable-line complexity
switch (arguments.length) {
/* istanbul ignore next */
case 0: return curried
case 1: return curry2(function (b, c) { return f(a, b, c); })
case 2: return function (c) { return f(a, b, c); }
Expand Down Expand Up @@ -670,8 +676,8 @@ function endStream(s) {
* transducer stream transformer
*/
function StreamTransformer() { }
StreamTransformer.prototype['@@transducer/init'] = function() { };
StreamTransformer.prototype['@@transducer/result'] = function() { };
StreamTransformer.prototype['@@transducer/init'] = /* istanbul ignore next */ function() { };
StreamTransformer.prototype['@@transducer/result'] = /* istanbul ignore next */ function() { };
StreamTransformer.prototype['@@transducer/step'] = function(s, v) { return v; };

return flyd;
Expand Down
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ function endStream(s) {
* transducer stream transformer
*/
function StreamTransformer() { }
StreamTransformer.prototype['@@transducer/init'] = function() { };
StreamTransformer.prototype['@@transducer/result'] = function() { };
StreamTransformer.prototype['@@transducer/init'] = /* istanbul ignore next */ function() { };
StreamTransformer.prototype['@@transducer/result'] = /* istanbul ignore next */ function() { };
StreamTransformer.prototype['@@transducer/step'] = function(s, v) { return v; };

export default flyd;

0 comments on commit 8c3f25b

Please sign in to comment.