Skip to content

Commit aa2d0aa

Browse files
author
Miguel Garcia Lafuente
committed
Reset the callbacks in reset function
1 parent 270cdfd commit aa2d0aa

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

lib/vendor/mockMashupPlatform.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,14 @@ var MockMP = {};
100100
};
101101

102102
namespace.MockMP.prototype.reset = function reset(spyList) {
103-
// Reset the calls.
104-
// var spySet = this.spySet;
105-
// if (spyList) {
106-
// spySet = spyList;
107-
// }
108-
// spySet.forEach(function (spy) {
109-
// spy.calls.reset();
110-
// });
111-
// Don't need, because setStrategy restore all
112-
113103
// Get back to the default values
104+
105+
// Clean callbacks
106+
this.callbacks = {
107+
'prefs': {'': []},
108+
'widget': {'': []},
109+
'wiring': {'': []}
110+
};
114111
if (typeof this.defaultValues === 'undefined' || typeof this.defaultValues !== 'object') {
115112
this.defaultValues = {};
116113
}

0 commit comments

Comments
 (0)