spec.ts icon indicating copy to clipboard operation
spec.ts copied to clipboard

assertNot(L, R)

Open xaviergonz opened this issue 5 years ago • 0 comments

it would be cool to have a negative assertion that ensures that a given L type does NOT conform to R type

e.g.

assert("hi", _ as "hi") // compiles ok
assert("bye", _ as "hi") // compilation error

assertNot("bye", _ as "hi") // compiles ok
assertNot("hi", _ as "hi") // compilation error

That way it can negative cases could be more easily integrated into jest without too many modification (just by expecting "ok" compilation cases for assertions and not assertions)

xaviergonz avatar Jul 20 '19 13:07 xaviergonz