Efficiency gains, logging updates, and bug fixes
This release brings with it numerous bug fixes, both to the source code and the tests. There are also a few new features added to the API:
- You can now indicate that ajax calls should not be retained (thanks to @suchipi):
$.mockjaxSettings.retainAjaxCalls = false;
- Refactored logging: we now have log levels built in with more messages sent. You can adjust the log level that Mockjax itself will use, or you can entirely overwrite the logger. While you could do this before, the logger now supports typical log methods on an object like the
console
uses. This makes it interact with other logging options such as Winston much cleaner. - Added ability for
data
property matching to be a function, and thus dynamic (thanks to @koorgoo) - Added ability to pass in array of mocks in addition to single mock handlers (thanks again @koorgoo)