Fork me on GitHub

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”?


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.