Closed HeeL closed 6 years ago
@robotlolita Coverage Check doesn't seem to recognize any of the branches I've tested. Do you know what might be the issue here and how I can fix this? Did I get the idea of your property-base testing correctly?
Oh. Maybe already has a fromNullable
defined (see https://github.com/origamitower/folktale/blob/master/packages/base/source/maybe/index.js#L38).
"static" functions go on the index.js module, and "instance" methods go on the maybe.js module. I suppose the structure and the way they're defined right now can be quite confusing :x
So, you've defined an instance method here, you'd only be able to call that with something like Maybe.of().fromNullable(value)
, the tests then end up calling the static function that is defined on index.js
I see, thank you for pointing this out
Add
Maybe.fromNullable