You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to allow the codemod to leave applications in a working state, we will need to provide a path away from using this.subject(). This transformation is discussed in emberjs/rfcs#232here.
We should transform the following for singletons (e.g. everything other than model and component):
import{moduleFor,test}from'ember-qunit';moduleFor('service:flash','Unit | Service | Flash',{unit: true});test('should allow messages to be queued',function(assert){letsubject=this.subject();// ...snip...});
Into this:
import{module,test}from'qunit';import{setupTest}from'ember-qunit';module('Unit | Service | Flash',function(hooks){setupTest(hooks);test('should allow messages to be queued',function(assert){letsubject=this.owner.lookup('service:flash');// ...snip...});});
And for non-singleton's we would do:
import{moduleFor,test}from'ember-qunit';moduleFor('model:foo','Unit | Model | Foo',{unit: true});test('should allow messages to be queued',function(assert){letsubject=this.subject();// ...snip...});
Into:
import{module,test}from'qunit';import{setupTest}from'ember-qunit';module('Unit | Model | Foo',function(hooks){setupTest(hooks);test('should allow messages to be queued',function(assert){letsubject=this.owner.factoryFor('model:foo').create();// ...snip...});});
The text was updated successfully, but these errors were encountered:
In order to allow the codemod to leave applications in a working state, we will need to provide a path away from using
this.subject()
. This transformation is discussed in emberjs/rfcs#232 here.We should transform the following for singletons (e.g. everything other than
model
andcomponent
):Into this:
And for non-singleton's we would do:
Into:
The text was updated successfully, but these errors were encountered: