| Page 1 of 1 | [ 2 posts ] |
|
I see Y.Mock has a callcount property which can be set in the expectation for verifying that the method is being called multiple times.
But apparently, it seems there is no way to pass multiple sets of arguments to the expectation. I'd like to test calls to the same method multiple times with different arguments (likely candidate Y.Base's set, on methods). |
|
Nevermind. It seems the expectation is to use a custom run function to verify the arguments.
Got it to work by Y.Mock.expect(mockView, { method: 'on', callCount : 2, run: onVerify, args: [Y.Mock.Value.String, Y.Mock.Value.Any, Y.Mock.Value.Any] }); And moving the verification of actual values in onVerify, method. But was wondering expectation.args could be an array of arguments instead |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group