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

Remove deprecated message on Map.IMap typedef and more... #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fantoine
Copy link

No description provided.

@fantoine
Copy link
Author

I also added a fix to handle parameters mapping on function type method parameters.

@fantoine
Copy link
Author

I also fixed the thenCall callback generation.
Before, the thenCall() or calls features expected an anonymous function taking an array of arguments as a single parameter. Something like this:

class MockMe {
    function foo(arg1, arg2) { /*...*/ }
}
//...
var myMock = Mockatoo.mock(MockMe);
myMock.foo(cast any, cast any).calls(function(arguments) {
    var arg1 = arguments[0];
    var arg2 = arguments[1];
    // Do your tests
});

I updated it to handle it more naturally with the same arguments list. Like this:

myMock.foo(cast any, cast any).calls(function(arg1, arg2) {
    // Do your tests
});

@fantoine fantoine changed the title Remove deprecated message on Map.IMap typedef Remove deprecated message on Map.IMap typedef and more... Mar 23, 2016
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

Successfully merging this pull request may close these issues.

1 participant