Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support legacy waiter system #477

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading