fix tests in droplab/hook_spec.js
This commit is contained in:
parent
5e4d02ba83
commit
00fc61cf11
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
||||||
import Hook from '~/droplab/hook';
|
import Hook from '~/droplab/hook';
|
||||||
import * as dropdownSrc from '~/droplab/drop_down';
|
|
||||||
|
|
||||||
describe('Hook', function () {
|
describe('Hook', function () {
|
||||||
describe('class constructor', function () {
|
describe('class constructor', function () {
|
||||||
|
@ -10,7 +9,7 @@ describe('Hook', function () {
|
||||||
this.config = {};
|
this.config = {};
|
||||||
this.dropdown = {};
|
this.dropdown = {};
|
||||||
|
|
||||||
spyOn(dropdownSrc, 'default').and.returnValue(this.dropdown);
|
this.dropdownConstructor = spyOnDependency(Hook, 'DropDown').and.returnValue(this.dropdown);
|
||||||
|
|
||||||
this.hook = new Hook(this.trigger, this.list, this.plugins, this.config);
|
this.hook = new Hook(this.trigger, this.list, this.plugins, this.config);
|
||||||
});
|
});
|
||||||
|
@ -24,7 +23,7 @@ describe('Hook', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call DropDown constructor', function () {
|
it('should call DropDown constructor', function () {
|
||||||
expect(dropdownSrc.default).toHaveBeenCalledWith(this.list, this.config);
|
expect(this.dropdownConstructor).toHaveBeenCalledWith(this.list, this.config);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set .type', function () {
|
it('should set .type', function () {
|
||||||
|
|
Loading…
Reference in a new issue