corregido test de datePicker

This commit is contained in:
Daniel Herrero 2017-12-13 14:14:44 +01:00
parent b8f50b64da
commit afa4f6532f
2 changed files with 5 additions and 4 deletions

View File

@ -18,14 +18,13 @@ export const formatEquivalence = {
};
class DatePicker extends Component {
constructor($element, $translate, $filter, $timeout, $attrs, $scope) {
constructor($element, $translate, $filter, $timeout, $attrs) {
super($element);
this.input = $element[0].querySelector('input');
this.$translate = $translate;
this.$filter = $filter;
this.$timeout = $timeout;
this.$attrs = $attrs;
this.$scope = $scope;
this.enabled = true;
this._modelView = null;
@ -202,7 +201,7 @@ class DatePicker extends Component {
this.destroyPicker();
}
}
DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs', '$scope'];
DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout', '$attrs'];
module.component('vnDatePicker', {
template: require('./datePicker.html'),

View File

@ -5,6 +5,7 @@ describe('Component vnDatePicker', () => {
let $scope;
let $timeout;
let $element;
let $attrs;
let $translate;
let controller;
@ -18,7 +19,8 @@ describe('Component vnDatePicker', () => {
$timeout = _$timeout_;
$element = angular.element(`<div><input></div>`);
$translate = _$translate_;
controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout});
$attrs = {};
controller = $componentController('vnDatePicker', {$scope, $element, $translate, $timeout, $attrs});
}));
describe('_formatFlat2Angular()', () => {