test-check

lgastako 2016-05-31T01:25:35.000007Z

Is there an idiomatic way to test that a function returns nil when given any value of any type other than the expected type? Or in general to generate something like “any value of any type exception this one”?

lucasbradstreet 2016-05-31T07:44:16.000008Z

lgastako: you can feed it gen/any, but it’ll be limited in the types that it can emit and you’d still need to test whether it sometimes returns a value when given the correct type. It doesn’t feel like the sort of thing I’d property test though.