Closed dominikj111 closed 2 years ago
Hello @domino2, I’m assuming you’re the one who posted on SO
Apologies that you’re still having issues with this, we’ll look into it :)
Yeah ... this is another issue actually (just related) :) I'm looking forward.
thanks again :) this does seem to be working as expected though
Game
is a getter/setter, what i think you want to be checking is game
as thats the property with a type of NullGame
Though there will be a problem with the type hinting on this, mock.game
will throw a ts error, so i will get back to you on passing a generic to the mock call
Oh i see your problem actally, game
is initiased, so pa.Game instanceof NullGame
should be true
@domino2 i've found a fix, i will release a new version soon
hey @domino2 ! i just released v1.1.15 that includes the fix @ebebbington made for this issue. you should be able to bump your rhum version and be good to go:
import { Rhum } from "https://deno.land/x/rhum@v1.1.15/mod.ts";
// or export { Rhum } from "https://deno.land/x/rhum@v1.1.15/mod.ts";
let us know if you have any issues. thanks !
Summary
The getter and setter defined in the mixin class is not processed. The mock see that property as undefined.
Steps To Reproduce The Bug
Expected Behavior
It will pass last line in the code above without an error.