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

Implement Prototype for create() #2

Closed
searls opened this issue Sep 7, 2015 · 0 comments
Closed

Implement Prototype for create() #2

searls opened this issue Sep 7, 2015 · 0 comments

Comments

@searls
Copy link
Member

searls commented Sep 7, 2015

When I call create and pass a prototypal function, I should expect to be returned an object with doubles for each of its prototype's functions.

For instance if I have:

Foo = function(){};
Foo.prototype.bar = function(){};
Foo.prototype.baz = function(){};

Then I should be able to:

testDouble = require('testdouble').create(Foo);
when(testDouble.bar(3)).thenReturn("LOL")
testDouble.bar(3) // "LOL" 
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

1 participant