Skip to content

Commit

Permalink
Fix ESLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Feb 13, 2018
1 parent 682e63d commit 06ee085
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 297 deletions.
12 changes: 3 additions & 9 deletions tests/handler_info_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ test('HandlerInfo can be aborted mid-resolve', function(assert) {
});
});

test('HandlerInfo#resolve resolves with a ResolvedHandlerInfo', function(
assert
) {
test('HandlerInfo#resolve resolves with a ResolvedHandlerInfo', function(assert) {
assert.expect(1);

var handlerInfo = create(StubHandlerInfo);
Expand Down Expand Up @@ -142,9 +140,7 @@ test('HandlerInfo#resolve runs afterModel hook on handler', function(assert) {
});
});

test('UnresolvedHandlerInfoByParam gets its model hook called', function(
assert
) {
test('UnresolvedHandlerInfoByParam gets its model hook called', function(assert) {
assert.expect(2);

var transition = {};
Expand All @@ -166,9 +162,7 @@ test('UnresolvedHandlerInfoByParam gets its model hook called', function(
handlerInfo.resolve(noop, transition);
});

test('UnresolvedHandlerInfoByObject does NOT get its model hook called', function(
assert
) {
test('UnresolvedHandlerInfoByObject does NOT get its model hook called', function(assert) {
assert.expect(1);

var handlerInfo = create(UnresolvedHandlerInfoByObject, {
Expand Down
48 changes: 12 additions & 36 deletions tests/query_params_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ scenarios.forEach(function(scenario) {
return true;
}

test('a change in query params fires a queryParamsDidChange event', function(
assert
) {
test('a change in query params fires a queryParamsDidChange event', function(assert) {
assert.expect(7);

var count = 0;
Expand Down Expand Up @@ -108,9 +106,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, '/index?foo=8&bar=9');
});

test('transitioning between routes fires a queryParamsDidChange event', function(
assert
) {
test('transitioning between routes fires a queryParamsDidChange event', function(assert) {
assert.expect(8);
var count = 0;
handlers.parent = {
Expand Down Expand Up @@ -164,9 +160,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, '/parent?foo=10&bar=11');
});

test('Refreshing the route when changing only query params should correctly set queryParamsOnly', function(
assert
) {
test('Refreshing the route when changing only query params should correctly set queryParamsOnly', function(assert) {
assert.expect(16);

var initialTransition = true;
Expand Down Expand Up @@ -260,9 +254,7 @@ scenarios.forEach(function(scenario) {
);
});

test('a handler can opt into a full-on transition by calling refresh', function(
assert
) {
test('a handler can opt into a full-on transition by calling refresh', function(assert) {
assert.expect(3);

var count = 0;
Expand Down Expand Up @@ -301,9 +293,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, '/index?foo=5&wat=lol');
});

test('at the end of a query param change a finalizeQueryParamChange event is fired', function(
assert
) {
test('at the end of a query param change a finalizeQueryParamChange event is fired', function(assert) {
assert.expect(5);

var eventHandled = false;
Expand Down Expand Up @@ -342,9 +332,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, '/index?foo=8&bar=9');
});

test('failing to consume QPs in finalize event tells the router it no longer has those params', function(
assert
) {
test('failing to consume QPs in finalize event tells the router it no longer has those params', function(assert) {
assert.expect(2);

handlers.index = {
Expand All @@ -358,9 +346,7 @@ scenarios.forEach(function(scenario) {
assert.deepEqual(router.state.queryParams, {});
});

test('consuming QPs in finalize event tells the router those params are active', function(
assert
) {
test('consuming QPs in finalize event tells the router those params are active', function(assert) {
assert.expect(1);

handlers.index = {
Expand All @@ -375,9 +361,7 @@ scenarios.forEach(function(scenario) {
assert.deepEqual(router.state.queryParams, { foo: '8' });
});

test("can hide query params from URL if they're marked as visible=false in finalizeQueryParamChange", function(
assert
) {
test("can hide query params from URL if they're marked as visible=false in finalizeQueryParamChange", function(assert) {
assert.expect(2);

handlers.index = {
Expand Down Expand Up @@ -413,9 +397,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, { queryParams: { foo: '123' } });
});

test('handleURL will NOT follow up with a replace URL if query params are already in sync', function(
assert
) {
test('handleURL will NOT follow up with a replace URL if query params are already in sync', function(assert) {
assert.expect(0);

router.replaceURL = function(url) {
Expand All @@ -440,9 +422,7 @@ scenarios.forEach(function(scenario) {
transitionTo(router, '/index?foo=5');
});

test('can cause full transition by calling refresh within queryParamsDidChange', function(
assert
) {
test('can cause full transition by calling refresh within queryParamsDidChange', function(assert) {
assert.expect(5);

var modelCount = 0;
Expand Down Expand Up @@ -523,9 +503,7 @@ scenarios.forEach(function(scenario) {
expectedUrl = '/index?foo=def';
});

test('tests whether query params to transitionTo are considered active', function(
assert
) {
test('tests whether query params to transitionTo are considered active', function(assert) {
assert.expect(6);

handlers.index = {
Expand Down Expand Up @@ -563,9 +541,7 @@ scenarios.forEach(function(scenario) {
);
});

test('tests whether array query params to transitionTo are considered active', function(
assert
) {
test('tests whether array query params to transitionTo are considered active', function(assert) {
assert.expect(7);

handlers.index = {
Expand Down
Loading

0 comments on commit 06ee085

Please sign in to comment.