From 6b634cfdae264fe81023880f392550c67a1101fc Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Sat, 11 Sep 2021 12:24:55 -0700 Subject: [PATCH] removed used test code --- .../tests/routing/decoupled_basic_test.js | 14 ++-------- .../ember/tests/routing/model_loading_test.js | 27 ------------------- .../tests/routing/template_rendering_test.js | 27 ------------------- 3 files changed, 2 insertions(+), 66 deletions(-) diff --git a/packages/ember/tests/routing/decoupled_basic_test.js b/packages/ember/tests/routing/decoupled_basic_test.js index ce9a0b2a1b6..2383ffef257 100644 --- a/packages/ember/tests/routing/decoupled_basic_test.js +++ b/packages/ember/tests/routing/decoupled_basic_test.js @@ -52,20 +52,10 @@ moduleFor( console.error = originalConsoleError; } - handleURLAborts(assert, path, deprecated) { + handleURLAborts(assert, path) { run(() => { let router = this.applicationInstance.lookup('router:main'); - let result; - - if (deprecated !== undefined) { - expectDeprecation(() => { - result = router.handleURL(path); - }); - } else { - result = router.handleURL(path); - } - - result.then( + router.handleURL(path).then( function () { assert.ok(false, 'url: `' + path + '` was NOT to be handled'); }, diff --git a/packages/ember/tests/routing/model_loading_test.js b/packages/ember/tests/routing/model_loading_test.js index 81f4bc23186..557f27924aa 100644 --- a/packages/ember/tests/routing/model_loading_test.js +++ b/packages/ember/tests/routing/model_loading_test.js @@ -29,33 +29,6 @@ moduleFor( console.error = originalConsoleError; } - handleURLAborts(assert, path, deprecated) { - run(() => { - let router = this.applicationInstance.lookup('router:main'); - let result; - - if (deprecated !== undefined) { - expectDeprecation(() => { - result = router.handleURL(path); - }); - } else { - result = router.handleURL(path); - } - - result.then( - function () { - assert.ok(false, 'url: `' + path + '` was NOT to be handled'); - }, - function (reason) { - assert.ok( - reason && reason.message === 'TransitionAborted', - 'url: `' + path + '` was to be aborted' - ); - } - ); - }); - } - async ['@test warn on URLs not included in the route set'](assert) { await this.visit('/'); diff --git a/packages/ember/tests/routing/template_rendering_test.js b/packages/ember/tests/routing/template_rendering_test.js index 842eb0e5540..47c51e049b0 100644 --- a/packages/ember/tests/routing/template_rendering_test.js +++ b/packages/ember/tests/routing/template_rendering_test.js @@ -29,33 +29,6 @@ moduleFor( console.error = originalConsoleError; } - handleURLAborts(assert, path, deprecated) { - run(() => { - let router = this.applicationInstance.lookup('router:main'); - let result; - - if (deprecated !== undefined) { - expectDeprecation(() => { - result = router.handleURL(path); - }); - } else { - result = router.handleURL(path); - } - - result.then( - function () { - assert.ok(false, 'url: `' + path + '` was NOT to be handled'); - }, - function (reason) { - assert.ok( - reason && reason.message === 'TransitionAborted', - 'url: `' + path + '` was to be aborted' - ); - } - ); - }); - } - get currentPath() { let currentPath; expectDeprecation(() => {