mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[mockState] allow passing in default values
This commit is contained in:
parent
34148143ad
commit
f4f65662b5
1 changed files with 2 additions and 1 deletions
|
@ -2,10 +2,11 @@ define(function (require) {
|
|||
var _ = require('lodash');
|
||||
var sinon = require('test_utils/auto_release_sinon');
|
||||
|
||||
function MockState() {
|
||||
function MockState(defaults) {
|
||||
this.on = _.noop;
|
||||
this.off = _.noop;
|
||||
this.save = sinon.stub();
|
||||
_.assign(this, defaults);
|
||||
}
|
||||
|
||||
MockState.prototype.resetStub = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue