-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blueprints/controller-test: Add RFC232 variants #15943
Conversation
import { setupTest } from 'ember-qunit'; | ||
|
||
module('<%= friendlyTestDescription %>', function(hooks) { | ||
setupTest(hooks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do needs
go? Should we indicate how those can be added to the registry or is this not a thing anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gloriously not a thing anymore.
to stub out lookups (if need be) we use this.owner.register
-- example:
this.owner.register('service:feature', Service.extend({
myFeature: false
});
probably don't need to document that here though
@@ -0,0 +1,12 @@ | |||
import { module, test } from 'qunit'; | |||
import { setupTest } from 'ember-qunit'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since only a unit test is generated, should this be named rfc232-default
or is the current name fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as is seems fine to me, it's not lying -- it is a unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a unit test
is it though...
I'd just use rfc232.js
in this case, but it doesn't matter much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for hopping in to help @snewcomer
@@ -0,0 +1,12 @@ | |||
import { module, test } from 'qunit'; | |||
import { setupTest } from 'ember-qunit'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a unit test
is it though...
I'd just use rfc232.js
in this case, but it doesn't matter much.
39de50d
to
7e7f58c
Compare
7e7f58c
to
345ba24
Compare
|
||
// Replace this with your real tests. | ||
test('it exists', function(assert) { | ||
let controller = this.owner.factoryFor('controller:<%= controllerPathName %>').create(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tweak this to use this.owner.lookup(‘controller:foo’);
? Controllers are intended to be singletons, so we don’t have to factoryFor(...).create()
..
Progress on #15933