Skip to content

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

Open
fantoine wants to merge 3 commits intomisprintt:masterfrom
fantoine:patch-1
Open

Remove deprecated message on Map.IMap typedef and more...#58
fantoine wants to merge 3 commits intomisprintt:masterfrom
fantoine:patch-1

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