Skip to content

Commit

Permalink
Drop support legacy waiter system (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli authored May 6, 2024
1 parent cf3fabe commit f61df14
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions addon/addon/waiter-manager.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { PendingWaiterState, Waiter, WaiterName } from './types';

import Ember from 'ember';
import { registerWaiter } from '@ember/test';

type Indexable = Record<any, unknown>;

// this ensures that if @ember/test-waiters exists in multiple places in the
Expand Down Expand Up @@ -37,18 +34,6 @@ function getGlobal(): Indexable {
throw new Error('unable to locate global object');
}

/**
* Backwards compatibility with legacy waiters system.
*
* We want to always register a waiter using the legacy waiter system, as right
* now if consumers are not on the right version of @ember/test-helpers, using
* this addon will result in none of these waiters waiting.
*/
// eslint-disable-next-line ember/new-module-imports
if (Ember.Test) {
registerWaiter(() => !hasPendingWaiters());
}

/**
* Registers a waiter.
*
Expand Down

0 comments on commit f61df14

Please sign in to comment.