Skip to content

Commit 97812c1

Browse files
committed
Remove EmberENV.EMBER_LOAD_HOOKS, which had a comment noting that it doesn't appear to be used by anything
1 parent 79dc9b0 commit 97812c1

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

index.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
// Test under octane defaults
1616
EmberENV._DEFAULT_ASYNC_OBSERVERS = true;
1717

18-
// Test for "hooks in EmberENV.EMBER_LOAD_HOOKS['hookName'] get executed"
19-
EmberENV.EMBER_LOAD_HOOKS = EmberENV.EMBER_LOAD_HOOKS || {};
20-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__ =
21-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__ || [];
22-
EmberENV.__test_hook_count__ = 0;
23-
EmberENV.EMBER_LOAD_HOOKS.__before_ember_test_hook__.push(function (object) {
24-
EmberENV.__test_hook_count__ += object;
25-
});
26-
2718
// Handle testing feature flags
2819
if (QUnit.urlParams.ENABLE_OPTIONAL_FEATURES) {
2920
EmberENV.ENABLE_OPTIONAL_FEATURES = true;

packages/@ember/-internals/environment/lib/env.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ export const ENV = {
144144
*/
145145
_RERENDER_LOOP_LIMIT: 1000,
146146

147-
EMBER_LOAD_HOOKS: {} as {
148-
[hook: string]: Function[];
149-
},
150-
151147
FEATURES: {} as {
152148
[feature: string]: boolean;
153149
},
@@ -179,18 +175,6 @@ if (typeof EmberENV === 'object' && EmberENV !== null) {
179175
}
180176
}
181177

182-
// TODO this does not seem to be used by anything,
183-
// can we remove it? do we need to deprecate it?
184-
let { EMBER_LOAD_HOOKS } = EmberENV;
185-
if (typeof EMBER_LOAD_HOOKS === 'object' && EMBER_LOAD_HOOKS !== null) {
186-
for (let hookName in EMBER_LOAD_HOOKS) {
187-
if (!Object.prototype.hasOwnProperty.call(EMBER_LOAD_HOOKS, hookName)) continue;
188-
let hooks = EMBER_LOAD_HOOKS[hookName];
189-
if (Array.isArray(hooks)) {
190-
ENV.EMBER_LOAD_HOOKS[hookName] = hooks.filter((hook) => typeof hook === 'function');
191-
}
192-
}
193-
}
194178
let { FEATURES } = EmberENV;
195179
if (typeof FEATURES === 'object' && FEATURES !== null) {
196180
for (let feature in FEATURES) {

0 commit comments

Comments
 (0)