-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
Is there any plans to support getters and setters mocking as well?
Right now it doesn't seem to work at all.
src:
class Device {
static model = 'Nexus';
static get isIphoneX(){
return this.model === 'iPhone X';
}
}test:
const mock1 = simple.mock(Device, 'isIphoneX', true);
console.log(Device.isIphoneX); // => false
console.log(mock1.callCount); // => undefined
const mock2 = simple.mock(Device, 'isIphoneX').returnWith(true);
console.log(Device.isIphoneX); // => false
console.log(mock2.callCount); // => undefinedThank you!
Zielak and nicinabox