Skip to content

Commit

Permalink
Revert "fix(confirm): add modal service with configuration options"
Browse files Browse the repository at this point in the history
This reverts commit 76ed01b.
  • Loading branch information
anehx committed May 6, 2022
1 parent c3fb2af commit d151396
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 143 deletions.
34 changes: 0 additions & 34 deletions addon/services/modal.js

This file was deleted.

4 changes: 2 additions & 2 deletions addon/utils/confirm.js
@@ -1,8 +1,8 @@
import UIkit from "uikit";

export default async function confirm(text, options = {}) {
export default async function confirm(text) {
try {
await UIkit.modal.confirm(text, options);
await UIkit.modal.confirm(text);

return true;
} catch (error) {
Expand Down
1 change: 0 additions & 1 deletion app/services/modal.js

This file was deleted.

89 changes: 0 additions & 89 deletions tests/unit/services/modal-test.js

This file was deleted.

17 changes: 0 additions & 17 deletions tests/unit/utils/confirm-test.js
Expand Up @@ -34,21 +34,4 @@ module("Unit | Utility | confirm", function (hooks) {

assert.verifySteps(["rejected"]);
});

test("can pass options", async function (assert) {
assert.expect(2);

const _original = UIkit.modal;

UIkit.modal = {
confirm: (text, options) => {
assert.strictEqual(text, "confirm");
assert.deepEqual(options, { container: "#modal-container" });
},
};

await confirm("confirm", { container: "#modal-container" });

UIkit.modal = _original;
});
});

0 comments on commit d151396

Please sign in to comment.