mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
31 lines
779 B
JavaScript
31 lines
779 B
JavaScript
'use strict'
|
|
//Adapted from http://stackoverflow.com/questions/23785603/angularjs-testing-with-jasmine-and-mixpanel
|
|
// @TODO: replace with an injectable mixpanel instance for testing
|
|
|
|
var MixpanelMock;
|
|
|
|
MixpanelMock = (function() {
|
|
function MixpanelMock() {}
|
|
|
|
MixpanelMock.prototype.track = function() {
|
|
return console.log("mixpanel.track", arguments);
|
|
};
|
|
|
|
MixpanelMock.prototype.register_once = function() {
|
|
return console.log("mixpanel.register_once", arguments);
|
|
};
|
|
|
|
MixpanelMock.prototype.identify = function() {
|
|
return console.log("mixpanel.identify", arguments);
|
|
};
|
|
|
|
MixpanelMock.prototype.register = function() {
|
|
return console.log("mixpanel.register", arguments);
|
|
};
|
|
|
|
return MixpanelMock;
|
|
|
|
})();
|
|
|
|
window.mixpanel = new MixpanelMock();
|