@@ -9,18 +9,6 @@ describe('$aria', function() {
9
9
dealoc ( element ) ;
10
10
} ) ;
11
11
12
- function injectScopeAndCompiler ( ) {
13
- return inject ( function ( _$compile_ , _$rootScope_ ) {
14
- $compile = _$compile_ ;
15
- scope = _$rootScope_ ;
16
- } ) ;
17
- }
18
-
19
- function compileElement ( inputHtml ) {
20
- element = $compile ( inputHtml ) ( scope ) ;
21
- scope . $digest ( ) ;
22
- }
23
-
24
12
describe ( 'aria-hidden' , function ( ) {
25
13
beforeEach ( injectScopeAndCompiler ) ;
26
14
@@ -84,7 +72,6 @@ describe('$aria', function() {
84
72
} ) ;
85
73
} ) ;
86
74
87
-
88
75
describe ( 'aria-hidden when disabled' , function ( ) {
89
76
beforeEach ( configAriaProvider ( {
90
77
ariaHidden : false
@@ -799,19 +786,31 @@ describe('$aria', function() {
799
786
expect ( element . attr ( 'tabindex' ) ) . toBeUndefined ( ) ;
800
787
} ) ;
801
788
} ) ;
802
- } ) ;
803
789
804
- function expectAriaAttrOnEachElement ( elem , ariaAttr , expected ) {
805
- angular . forEach ( elem , function ( val ) {
806
- expect ( angular . element ( val ) . attr ( ariaAttr ) ) . toBe ( expected ) ;
807
- } ) ;
808
- }
790
+ // Helpers
791
+ function compileElement ( inputHtml ) {
792
+ element = $compile ( inputHtml ) ( scope ) ;
793
+ scope . $digest ( ) ;
794
+ }
795
+
796
+ function configAriaProvider ( config ) {
797
+ return function ( ) {
798
+ module ( function ( $ariaProvider ) {
799
+ $ariaProvider . config ( config ) ;
800
+ } ) ;
801
+ } ;
802
+ }
809
803
810
- function configAriaProvider ( config ) {
811
- return function ( ) {
812
- angular . module ( 'ariaTest' , [ 'ngAria' ] ) . config ( function ( $ariaProvider ) {
813
- $ariaProvider . config ( config ) ;
804
+ function expectAriaAttrOnEachElement ( elem , ariaAttr , expected ) {
805
+ angular . forEach ( elem , function ( val ) {
806
+ expect ( angular . element ( val ) . attr ( ariaAttr ) ) . toBe ( expected ) ;
814
807
} ) ;
815
- module ( 'ariaTest' ) ;
816
- } ;
817
- }
808
+ }
809
+
810
+ function injectScopeAndCompiler ( ) {
811
+ return inject ( function ( _$compile_ , _$rootScope_ ) {
812
+ $compile = _$compile_ ;
813
+ scope = _$rootScope_ ;
814
+ } ) ;
815
+ }
816
+ } ) ;
0 commit comments