Skip to content

Commit

Permalink
removed used test code
Browse files Browse the repository at this point in the history
  • Loading branch information
xg-wang committed Sep 11, 2021
1 parent 2855399 commit 6b634cf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 66 deletions.
14 changes: 2 additions & 12 deletions packages/ember/tests/routing/decoupled_basic_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},
Expand Down
27 changes: 0 additions & 27 deletions packages/ember/tests/routing/model_loading_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('/');

Expand Down
27 changes: 0 additions & 27 deletions packages/ember/tests/routing/template_rendering_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 6b634cf

Please sign in to comment.