Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to view unmatched interactions on a mock #28

Open
Bringer128 opened this issue Dec 11, 2013 · 1 comment
Open

Add ability to view unmatched interactions on a mock #28

Bringer128 opened this issue Dec 11, 2013 · 1 comment

Comments

@Bringer128
Copy link

In Mockito, when using verify() you get a list of all the interactions with a mock on a failure.

So the use cases would be:

var func = mockFunction();
func('abc');
verify(func)('def');
// Prints the following: 
// Wanted but not invoked: func('def')
// However, there were these interactions: 
// --> func('abc')
var func = mockFunction();
func('abc');
func('def');
verifyNoInteractions(func);
// Prints the following: 
// Wanted not invoked: func('abc')
// However, there were these interactions: 
// --> func('abc')
// --> func('def')

etc.

I've been prototyping this change and it doesn't look too hard, I've just run into some problems running the unit tests (the browser locks up). Should I be using ant to run them?

@cleishm
Copy link
Owner

cleishm commented Dec 18, 2013

Hi @Bringer128,

You can use Ant, or just run them in the browser. I haven't worked on JsMockito in some time, and it was written back when the only real headless option was Rhino. It would be ideal to re-package it (and probably rewrite the unit tests) to run on node.js now. At some point I may find the time to do that!

Cheers,
Chris

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants