{"action":"created","issue":{"url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/24","labels_url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/24/comments","events_url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/24/events","html_url":"https://github.com/ramda/ramda-fantasy/pull/24","id":59410558,"number":24,"title":"Jsverify","user":{"login":"joneshf","id":1356417,"avatar_url":"https://avatars.githubusercontent.com/u/1356417?v=3","gravatar_id":"","url":"https://api.github.com/users/joneshf","html_url":"https://github.com/joneshf","followers_url":"https://api.github.com/users/joneshf/followers","following_url":"https://api.github.com/users/joneshf/following{/other_user}","gists_url":"https://api.github.com/users/joneshf/gists{/gist_id}","starred_url":"https://api.github.com/users/joneshf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneshf/subscriptions","organizations_url":"https://api.github.com/users/joneshf/orgs","repos_url":"https://api.github.com/users/joneshf/repos","events_url":"https://api.github.com/users/joneshf/events{/privacy}","received_events_url":"https://api.github.com/users/joneshf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-01T18:20:29Z","updated_at":"2015-03-03T23:16:05Z","closed_at":"2015-03-01T18:47:47Z","pull_request":{"url":"https://api.github.com/repos/ramda/ramda-fantasy/pulls/24","html_url":"https://github.com/ramda/ramda-fantasy/pull/24","diff_url":"https://github.com/ramda/ramda-fantasy/pull/24.diff","patch_url":"https://github.com/ramda/ramda-fantasy/pull/24.patch"},"body":"This isn't a complete PR.\r\n\r\nRe: #20 I wasn't aware of `jsverify`. It seems like a good choice. Plus @robotlolita endorsed it.\r\n\r\nAs a benefit of having property based tests, another bug was found.\r\n\r\nIf you want to go this route I can throw together the rest of the tests sometime this coming week. If not, close this PR."},"comment":{"url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/comments/77060888","html_url":"https://github.com/ramda/ramda-fantasy/pull/24#issuecomment-77060888","issue_url":"https://api.github.com/repos/ramda/ramda-fantasy/issues/24","id":77060888,"user":{"login":"joneshf","id":1356417,"avatar_url":"https://avatars.githubusercontent.com/u/1356417?v=3","gravatar_id":"","url":"https://api.github.com/users/joneshf","html_url":"https://github.com/joneshf","followers_url":"https://api.github.com/users/joneshf/followers","following_url":"https://api.github.com/users/joneshf/following{/other_user}","gists_url":"https://api.github.com/users/joneshf/gists{/gist_id}","starred_url":"https://api.github.com/users/joneshf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joneshf/subscriptions","organizations_url":"https://api.github.com/users/joneshf/orgs","repos_url":"https://api.github.com/users/joneshf/repos","events_url":"https://api.github.com/users/joneshf/events{/privacy}","received_events_url":"https://api.github.com/users/joneshf/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T23:16:05Z","updated_at":"2015-03-03T23:16:05Z","body":"Oh, I still had more to go on here :).\r\n\r\nI added some helpers here: https://github.com/joneshf/ramda-fantasy/blob/jsverify/src/Either.js#L30-L36 because I realized that `instanceof` check doesn't actually work. That means that these two checks don't work either: https://github.com/joneshf/ramda-fantasy/blob/jsverify/test/maybe.test.js#L13 https://github.com/joneshf/ramda-fantasy/blob/jsverify/test/maybe.test.js#L21.\r\n\r\nRather than duplicate the effort of #22, I'll just wait until that PR is merged before updating those tests.\r\n\r\nI'm not sure there's a nice way to use jsverify to test `Reader` properly with the way tests are now. I've been thinking about changing the functions in `test/types.js` a bit. If they take an equivalence function with how to evaluate each side of the equation, we should be able to make testing work for all things now and in the future:\r\n\r\n```javascript\r\nid: function(equiv, obj) {\r\n  return equiv(obj, obj.map(identity));\r\n},\r\ncompose: function(equiv, obj, f, g) {\r\n  return equiv(obj.map(function(x) { return f(g(x)); }), obj.map(f).map(g));\r\n}\r\n```\r\n\r\nSo in the case of `Reader`, we could have:\r\n\r\n```javascript\r\nvar eqReader = function(x) {\r\n  return function(a, b) {\r\n    return a.run(x) === b.run(x);\r\n  };\r\n};\r\n```\r\n\r\nThoughts?"}}