VulpesOS/gaia/shared/test/unit/mocks/mock_option_menu.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

23 lines
540 B
JavaScript
Executable file

'use strict';
function MockOptionMenu(options) {
MockOptionMenu.calls.push(options);
MockOptionMenu.instances.push(this);
}
MockOptionMenu.prototype = {
show: function() {
this.show.called = true;
}
};
// create an array to hold any calls to this function to test them
MockOptionMenu.mSetup = function() {
MockOptionMenu.calls = [];
MockOptionMenu.instances = [];
};
// destroy the array so it resets every time
MockOptionMenu.mTeardown = function() {
delete MockOptionMenu.calls;
delete MockOptionMenu.instances;
};