我在我的应用程序中使用javascript getter已经有很长一段时间了,我一直认为myobject.prototype.__defineGetter__('something', function () {})
myobject.something // the computation will be done here
myobject.so
Spek文档参考 As a best practice you typically want test values to be unique for each test this can be done by using a lateinit variable and assigning it within a beforeEachTest. lateinit var calculator: Calculator
calculator = Calculator()
To make it more concise, Spek provides