any way to assert a variable is a specific instanc...
# kotest
e
any way to assert a variable is a specific instance? I only find
shouldBeSameInstanceAs
p
instance should { it is Type }
e
assert
+
is
looks more concise
thanks anyway
t
same instance or instance of? (sorry for the dumb question, but I don’t get the remark on
shouldBeSameInstanceAs
if you meant same instance, it checks reference equality which is what I understand with same instance)
in case you mean instance of, there is also
instance should beInstanceOf<Type>()
or
instance.shouldBeInstanceOf<Type>()
if you like the non infix version more
e
instanceOf