import './index.js'; describe('Component vnInputFile', () => { let $element; let $scope; let controller; beforeEach(ngModule('vnCore')); beforeEach(inject(($compile, $rootScope) => { $scope = $rootScope.$new(); $element = $compile('')($scope); controller = $element.controller('vnInputFile'); })); afterAll(() => { $element.remove(); $scope.$destroy(); }); describe('field() setter', () => { it(`should set an empty string as value when null value is set`, () => { controller.field = null; expect(controller.value).toBe(''); }); }); });