describe('Component vnRadio', () => { let $element; let $ctrl; let element; beforeEach(angular.mock.module('vnCore', $translateProvider => { $translateProvider.translations('en', {}); })); beforeEach(inject(($compile, $rootScope) => { $element = $compile(` { $element.remove(); }); describe('field() setter', () => { it(`should change field value when clicked`, () => { element.click(); expect($ctrl.field).toEqual('myVal'); }); }); });