@@ -125,7 +125,7 @@ describe("ngInclude", () => {
125125 it ( "should fire $includeContentRequested event on scope after making the xhr call" , ( done ) => {
126126 let called = false ;
127127
128- window . angular . module ( "myModule" , [ ] ) . run ( ( $rootScope ) => {
128+ module . run ( ( $rootScope ) => {
129129 $rootScope . $on ( "$includeContentRequested" , ( event ) => {
130130 called = true ;
131131 } ) ;
@@ -166,7 +166,7 @@ describe("ngInclude", () => {
166166 const contentLoadedSpy = jasmine . createSpy ( "content loaded" ) ;
167167 const contentErrorSpy = jasmine . createSpy ( "content error" ) ;
168168
169- window . angular . module ( "myModule" , [ ] ) . run ( ( $rootScope ) => {
169+ module . run ( ( $rootScope ) => {
170170 $rootScope . url = "/mock/401" ;
171171 $rootScope . $on ( "$includeContentLoaded" , contentLoadedSpy ) ;
172172 $rootScope . $on ( "$includeContentError" , contentErrorSpy ) ;
@@ -186,8 +186,6 @@ describe("ngInclude", () => {
186186 } ) ;
187187
188188 it ( "should evaluate onload expression when a partial is loaded" , ( done ) => {
189- window . angular . module ( "myModule" , [ ] ) ;
190-
191189 element = createElementFromHTML (
192190 '<div><div><ng-include src="url" onload="loaded = true"></ng-include></div></div>' ,
193191 ) ;
@@ -203,8 +201,6 @@ describe("ngInclude", () => {
203201 } ) ;
204202
205203 it ( "should create child scope and destroy old one" , ( done ) => {
206- window . angular . module ( "myModule" , [ ] ) ;
207-
208204 element = createElementFromHTML (
209205 '<div><ng-include src="url"></ng-include></div>' ,
210206 ) ;
@@ -240,7 +236,6 @@ describe("ngInclude", () => {
240236 } ) ;
241237
242238 it ( "should do xhr request and cache it" , async ( ) => {
243- window . angular . module ( "myModule" , [ ] ) ;
244239 element = createElementFromHTML (
245240 '<div><ng-include src="url"></ng-include></div>' ,
246241 ) ;
@@ -260,7 +255,6 @@ describe("ngInclude", () => {
260255 } ) ;
261256
262257 it ( "should clear content when error during xhr request" , async ( ) => {
263- window . angular . module ( "myModule" , [ ] ) ;
264258 element = createElementFromHTML (
265259 '<div><ng-include src="url">content</ng-include></div>' ,
266260 ) ;
@@ -272,7 +266,6 @@ describe("ngInclude", () => {
272266 } ) ;
273267
274268 it ( "should be async even if served from cache" , ( done ) => {
275- window . angular . module ( "myModule" , [ ] ) ;
276269 element = createElementFromHTML (
277270 '<div><ng-include src="url"></ng-include></div>' ,
278271 ) ;
@@ -287,7 +280,6 @@ describe("ngInclude", () => {
287280 } ) ;
288281
289282 it ( "should discard pending xhr callbacks if a new template is requested before the current finished loading" , ( done ) => {
290- window . angular . module ( "myModule" , [ ] ) ;
291283 element = createElementFromHTML (
292284 "<div><ng-include src='templateUrl'></ng-include></div>" ,
293285 ) ;
0 commit comments