javascript - Why do you need to call both replayAll and verifyAll when using Google Closure mocks? -
reading code using closure's mocks , big confused syntax. many this:
mockchart(); // test this.mockcontrol.$replayall(); this.mainmethod(testdata); // verify this.mockcontrol.$verifyall(); // lots of asserts
i don't understand why 1 phone call both replay , later verify. sounds replay doing work of record, have expected have started already.
the flow bit different mockito, other framework i'm familiar with, , haven't found documentation @ level (just class-level jsdoc).
javascript unit-testing mocking google-closure
No comments:
Post a Comment