Closed DominikGuzei closed 8 years ago
Makes it possible to define a onConstruction hook on any mixin that gets called when the host class is constructed:
onConstruction
myMixin = onConstruction: sinon.spy() TestClass = Space.Object.extend(mixin: myMixin) first = {} second = {} new TestClass(first, second) expect(myMixin.onConstruction).to.have.been.calledWithExactly(first, second)
Space is starting to look like ES9 :)
This is solid, exactly what I was thinking yesterday
Makes it possible to define a
onConstruction
hook on any mixin that gets called when the host class is constructed: