From ab3457ab6b828afb21436d8f915611abd18d85b4 Mon Sep 17 00:00:00 2001 From: Andrew Kirwin Date: Mon, 18 Dec 2023 09:16:45 +0000 Subject: [PATCH] remove use of rsvp --- addon/components/modal-dialog.js | 3 +-- tests/dummy/app/controllers/application.js | 1 - tests/integration/components/modal-dialog-test.gjs | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addon/components/modal-dialog.js b/addon/components/modal-dialog.js index 4a6a818..e2eccda 100644 --- a/addon/components/modal-dialog.js +++ b/addon/components/modal-dialog.js @@ -5,7 +5,6 @@ import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'; import { action } from '@ember/object'; import { waitFor } from '@ember/test-waiters'; import { waitForAnimation } from '@zestia/animation-utils'; -import { all } from 'rsvp'; export default class ModalDialogComponent extends Component { @tracked isInViewport; @@ -223,7 +222,7 @@ export default class ModalDialogComponent extends Component { @waitFor _waitForAnimation() { - return all([ + return Promise.all([ waitForAnimation(this.element, { maybe: true }), waitForAnimation(this.boxElement, { maybe: true }) ]); diff --git a/tests/dummy/app/controllers/application.js b/tests/dummy/app/controllers/application.js index fe6d0bc..8541760 100644 --- a/tests/dummy/app/controllers/application.js +++ b/tests/dummy/app/controllers/application.js @@ -2,7 +2,6 @@ import Controller from '@ember/controller'; import { tracked } from '@glimmer/tracking'; -import { Promise } from 'rsvp'; import { action } from '@ember/object'; import { later } from '@ember/runloop'; diff --git a/tests/integration/components/modal-dialog-test.gjs b/tests/integration/components/modal-dialog-test.gjs index 10304ec..21defe1 100755 --- a/tests/integration/components/modal-dialog-test.gjs +++ b/tests/integration/components/modal-dialog-test.gjs @@ -1,7 +1,7 @@ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import waitForAnimation from 'dummy/tests/helpers/wait-for-animation'; -import { reject, resolve, defer } from 'rsvp'; +import { defer } from 'rsvp'; import { modifier } from 'ember-modifier'; import ModalDialog from '@zestia/ember-modal-dialog/components/modal-dialog'; import autoFocus from '@zestia/ember-auto-focus/modifiers/auto-focus'; @@ -343,7 +343,7 @@ module('modal-dialog', function (hooks) { @tracked error; })(); - const load = () => reject({ message: 'sorry' }); + const load = () => Promise.reject(new Error('sorry')); const loadError = (error) => (state.error = error); await render(