@@ -7,7 +7,7 @@ import type { Resolver } from '@ember/owner';
7
7
import { setOwner } from '@ember/application' ;
8
8
9
9
import buildOwner , { type Owner } from './build-owner.ts' ;
10
- import { _setupAJAXHooks , _teardownAJAXHooks } from './settled.ts' ;
10
+ import { _setupAJAXHooks } from './settled.ts' ;
11
11
import { _prepareOnerror } from './setup-onerror.ts' ;
12
12
import Ember from 'ember' ;
13
13
import {
@@ -19,10 +19,6 @@ import global from './global.ts';
19
19
import { getResolver } from './resolver.ts' ;
20
20
import { getApplication } from './application.ts' ;
21
21
import getTestMetadata from './test-metadata.ts' ;
22
- import {
23
- registerDestructor ,
24
- associateDestroyableChild ,
25
- } from '@ember/destroyable' ;
26
22
import {
27
23
getDeprecationsForContext ,
28
24
getDeprecationsDuringCallbackForContext ,
@@ -211,20 +207,6 @@ export function resumeTest(): void {
211
207
context . resumeTest ( ) ;
212
208
}
213
209
214
- /**
215
- @private
216
- @param {Object } context the test context being cleaned up
217
- */
218
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
219
- function cleanup ( context : BaseContext ) {
220
- _teardownAJAXHooks ( ) ;
221
-
222
- // SAFETY: this is intimate API *designed* for us to override.
223
- ( Ember as any ) . testing = false ;
224
-
225
- unsetContext ( ) ;
226
- }
227
-
228
210
/**
229
211
* Returns deprecations which have occurred so far for a the current test context
230
212
*
@@ -410,8 +392,6 @@ export default function setupContext<T extends object>(
410
392
411
393
_backburner . DEBUG = true ;
412
394
413
- registerDestructor ( context , cleanup ) ;
414
-
415
395
_prepareOnerror ( context ) ;
416
396
417
397
return Promise . resolve ( )
@@ -438,8 +418,6 @@ export default function setupContext<T extends object>(
438
418
return buildOwner ( getApplication ( ) , getResolver ( ) ) ;
439
419
} )
440
420
. then ( ( owner ) => {
441
- associateDestroyableChild ( context , owner ) ;
442
-
443
421
Object . defineProperty ( context , 'owner' , {
444
422
configurable : true ,
445
423
enumerable : true ,
0 commit comments