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
It is not uncommon to add properties to the options passed into the various moduleFor methods. In ember-qunit@2 any function properties added to that object were memoized, and any non-function properties were simply passed through to QUnit's module untouched.
I believe that we should remove this memoization while doing the transform (we can always disable it later if it seems trolling to folks).
module('service:foo',function(hooks){setupTest(hooks);functionbuildWidget(){returnsomeThing();}test('can handle widgets',function(assert){letsubject=this.owner.lookup('service:foo');// when the function does not use `this`:letwidget=buildWidget();// when the function does use `this`:letwidget=buildWidget.call(this);subject.handleWidget(widget);assert.equal(widget,this.buildWidget());});});
The text was updated successfully, but these errors were encountered:
rwjblue
changed the title
Other function properties in moduleFor* options are lost
Non-lifecycle hook function properties in moduleFor* options are lost
Oct 21, 2017
It is not uncommon to add properties to the options passed into the various
moduleFor
methods. In ember-qunit@2 any function properties added to that object were memoized, and any non-function properties were simply passed through to QUnit'smodule
untouched.I believe that we should remove this memoization while doing the transform (we can always disable it later if it seems trolling to folks).
Input:
Suggested output:
The text was updated successfully, but these errors were encountered: