Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
andreisebastianc committed Oct 17, 2020
1 parent 619f902 commit 02f092a
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -551,12 +551,7 @@ moduleFor(
},
})
);
this.register(
'template:application_error',
compile(
'Error! {{@model.message}}'
)
);
this.register('template:application_error', compile('Error! {{@model.message}}'));
this.register(
'route:post',
Route.extend({
Expand Down Expand Up @@ -595,12 +590,7 @@ moduleFor(
},
})
);
this.register(
'template:error',
compile(
'Error! {{@model.message}}'
)
);
this.register('template:error', compile('Error! {{@model.message}}'));
this.register(
'route:post',
Route.extend({
Expand Down Expand Up @@ -639,12 +629,7 @@ moduleFor(
},
})
);
this.register(
'template:post_error',
compile(
'Error! {{@model.message}}'
)
);
this.register('template:post_error', compile('Error! {{@model.message}}'));
this.register(
'route:post',
Route.extend({
Expand Down Expand Up @@ -683,12 +668,7 @@ moduleFor(
},
})
);
this.register(
'template:post.error',
compile(
'Error! {{@model.message}}'
)
);
this.register('template:post.error', compile('Error! {{@model.message}}'));
this.register(
'route:post.comments',
Route.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ moduleFor(
`);
}

async ['@test interior mutations on the model with tracked properties'](
assert
) {
async ['@test interior mutations on the model with tracked properties'](assert) {
class Model {
@tracked color;

Expand Down Expand Up @@ -317,9 +315,7 @@ moduleFor(
`);
}

async ['@test exterior mutations on the model with tracked properties'](
assert
) {
async ['@test exterior mutations on the model with tracked properties'](assert) {
this.router.map(function () {
this.route('color', { path: '/:color' });
});
Expand Down Expand Up @@ -712,9 +708,7 @@ moduleFor(
});
}

async ['@test it emits a useful backtracking re-render assertion message'](
assert
) {
async ['@test it emits a useful backtracking re-render assertion message'](assert) {
this.router.map(function () {
this.route('routeWithError');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,7 @@ moduleFor(
});
}

async [`@test The <LinkTo /> component moves into the named route with context`](
assert
) {
async [`@test The <LinkTo /> component moves into the named route with context`](assert) {
this.router.map(function () {
this.route('about');
this.route('item', { path: '/item/:id' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,7 @@ moduleFor(
});
}

async [`@test The {{link-to}} component moves into the named route with context`](
assert
) {
async [`@test The {{link-to}} component moves into the named route with context`](assert) {
this.router.map(function () {
this.route('about');
this.route('item', { path: '/item/:id' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,9 @@ moduleFor(
this._super(...arguments);
this.register(
'template:application',
compile(
'<h2>Param Engine: {{@model.foo}}</h2>',
{
moduleName: 'my-app/templates/application.hbs',
}
)
compile('<h2>Param Engine: {{@model.foo}}</h2>', {
moduleName: 'my-app/templates/application.hbs',
})
);
},
})
Expand Down
5 changes: 1 addition & 4 deletions packages/ember/tests/homepage_example_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ import { moduleFor, ApplicationTestCase } from 'internal-test-helpers';
moduleFor(
'The example renders correctly',
class extends ApplicationTestCase {

async ['@test Render index template into application outlet'](
assert
) {
async ['@test Render index template into application outlet'](assert) {
this.addTemplate('application', '{{outlet}}');
this.addTemplate(
'index',
Expand Down
12 changes: 3 additions & 9 deletions packages/ember/tests/routing/model_loading_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ moduleFor(
});
}

[`@test The Specials Page getting its model by deserializing the params hash`](
assert
) {
[`@test The Specials Page getting its model by deserializing the params hash`](assert) {
this.router.map(function () {
this.route('home', { path: '/' });
this.route('special', { path: '/specials/:menu_item_id' });
Expand Down Expand Up @@ -446,9 +444,7 @@ moduleFor(
});
}

['@test Moving from one page to another triggers the correct callbacks'](
assert
) {
['@test Moving from one page to another triggers the correct callbacks'](assert) {
assert.expect(3);

this.router.map(function () {
Expand Down Expand Up @@ -481,9 +477,7 @@ moduleFor(
});
}

['@test Nested callbacks are not exited when moving to siblings'](
assert
) {
['@test Nested callbacks are not exited when moving to siblings'](assert) {
let rootSetup = 0;
let rootRender = 0;
let rootModel = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ moduleFor(
});
}

async ['@test RouterService#transitionTo with dynamic segment'](
assert
) {
async ['@test RouterService#transitionTo with dynamic segment'](assert) {
assert.expect(3);

let componentInstance;
Expand Down Expand Up @@ -196,9 +194,7 @@ moduleFor(
this.assertText('much dynamicism');
}

async ['@test RouterService#transitionTo with dynamic segment and model hook'](
assert
) {
async ['@test RouterService#transitionTo with dynamic segment and model hook'](assert) {
assert.expect(3);

let componentInstance;
Expand Down
4 changes: 1 addition & 3 deletions packages/ember/tests/routing/substates_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,7 @@ moduleFor(
return promise;
}

async ['@test Default error event moves into nested route'](
assert
) {
async ['@test Default error event moves into nested route'](assert) {
await this.visit('/');

this.addTemplate('grandma.error', 'ERROR: {{@model.msg}}');
Expand Down
8 changes: 2 additions & 6 deletions packages/ember/tests/routing/template_rendering_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ moduleFor(
assert.equal(this.$('p').text(), 'YES I AM HOME', 'The homepage template was rendered');
}

async [`@test Model passed via renderTemplate model is set as controller's model`](
assert
) {
async [`@test Model passed via renderTemplate model is set as controller's model`](assert) {
this.addTemplate(
'bio',
'<p>Model: {{@model.name}}</p><p>Controller: {{this.model.name}}</p>'
Expand Down Expand Up @@ -550,9 +548,7 @@ moduleFor(
});
}

async ["@test The template is not re-rendered when the route's model changes"](
assert
) {
async ["@test The template is not re-rendered when the route's model changes"](assert) {
this.router.map(function () {
this.route('page', { path: '/page/:name' });
});
Expand Down

0 comments on commit 02f092a

Please sign in to comment.