Skip to content

Commit 6d7a4b6

Browse files
committedAug 27, 2020
Remove teardownRenderingContext and teardownApplicationContext
Now that we have moved to levearging `@ember/destroyables` to manage our cleanup, we no longer need custom `teardownXContext` functions (because we can register a destructor as needed on the test context).
1 parent 3c4f43d commit 6d7a4b6

10 files changed

+0
-116
lines changed
 

‎addon-test-support/@ember/test-helpers/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ export {
1010
} from './setup-context';
1111
export { default as teardownContext } from './teardown-context';
1212
export { default as setupRenderingContext, render, clearRender } from './setup-rendering-context';
13-
export { default as teardownRenderingContext } from './teardown-rendering-context';
1413
export {
1514
default as setupApplicationContext,
1615
visit,
1716
currentRouteName,
1817
currentURL,
1918
} from './setup-application-context';
20-
export { default as teardownApplicationContext } from './teardown-application-context';
2119
export { default as settled, isSettled, getSettledState } from './settled';
2220
export { default as waitUntil } from './wait-until';
2321
export { default as validateErrorHandler } from './validate-error-handler';

‎addon-test-support/@ember/test-helpers/teardown-application-context.ts

-24
This file was deleted.

‎addon-test-support/@ember/test-helpers/teardown-rendering-context.ts

-35
This file was deleted.

‎documentation.yml

-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ toc:
5656
- unsetContext
5757
- teardownContext
5858
- setupRenderingContext
59-
- teardownRenderingContext
6059
- getApplication
6160
- setApplication
6261
- setupApplicationContext
63-
- teardownApplicationContext
6462
- validateErrorHandler
6563
- setupOnerror
6664
- resetOnerror

‎tests/integration/settled-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
setupContext,
77
setupRenderingContext,
88
teardownContext,
9-
teardownRenderingContext,
109
click,
1110
isSettled,
1211
getSettledState,
@@ -142,7 +141,6 @@ module('settled real-world scenarios', function (hooks) {
142141

143142
this.server.shutdown();
144143

145-
await teardownRenderingContext(this);
146144
await teardownContext(this);
147145
});
148146

‎tests/integration/setup-rendering-context-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
setupContext,
77
setupRenderingContext,
88
teardownContext,
9-
teardownRenderingContext,
109
waitFor,
1110
render,
1211
click,
@@ -87,7 +86,6 @@ module('setupRenderingContext "real world"', function (hooks) {
8786

8887
hooks.afterEach(async function () {
8988
Ember.Test.unregisterWaiter(this._waiter);
90-
await teardownRenderingContext(this);
9189
await teardownContext(this);
9290
});
9391

‎tests/unit/dom/logging-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
setupContext,
66
setupRenderingContext,
77
teardownContext,
8-
teardownRenderingContext,
98
} from '@ember/test-helpers';
109
import hasEmberVersion from '@ember/test-helpers/has-ember-version';
1110
import { elementToString } from '@ember/test-helpers/dom/-logging';
@@ -23,7 +22,6 @@ module('elementToString()', function (hooks) {
2322

2423
hooks.afterEach(async function () {
2524
await settled();
26-
await teardownRenderingContext(this);
2725
await teardownContext(this);
2826
});
2927

‎tests/unit/setup-application-context-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
setupContext,
88
setupApplicationContext,
99
teardownContext,
10-
teardownApplicationContext,
1110
getTestMetadata,
1211
click,
1312
visit,
@@ -74,7 +73,6 @@ module('setupApplicationContext', function (hooks) {
7473
});
7574

7675
hooks.afterEach(async function () {
77-
await teardownApplicationContext(this);
7876
await teardownContext(this);
7977
});
8078

‎tests/unit/setup-rendering-context-test.js

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
setupContext,
99
setupRenderingContext,
1010
teardownContext,
11-
teardownRenderingContext,
1211
_registerHook,
1312
getTestMetadata,
1413
render,
@@ -60,7 +59,6 @@ module('setupRenderingContext', function (hooks) {
6059
});
6160

6261
hooks.afterEach(async function () {
63-
await teardownRenderingContext(this);
6462
await teardownContext(this);
6563
});
6664

‎tests/unit/teardown-rendering-context-test.js

-43
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.