We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.13.3
Unit testing a route's actions via route.send is now broken, as this.router (https://github.com/emberjs/ember.js/blob/v1.13.3/packages/ember-routing/lib/system/route.js#L1082) refers to the service (router.router is undefined) and the else conditional never hits.
route.send
this.router
router.router
undefined
else
Sample test to reproduce:
// app/foo/route.js import Ember from 'ember'; const set = Ember.set; export default Ember.Route.extend({ actions: { update(key, value) { set(this, key, value); } } }); // tests/unit/foo/route-test.js import Ember from 'ember'; import { moduleFor, test } from 'ember-qunit'; const get = Ember.get; moduleFor('route:foo', 'Unit | Route | foo'); test('action `foo` does something', function(assert) { const expectedResult = 'bar'; const route = this.subject(); route.send('update', 'foo', 'bar'); // TypeError: Cannot read property 'trigger' of undefined assert.equal(get(route, 'foo'), expectedResult, 'it sets the value'); });
Related – #9820
The text was updated successfully, but these errors were encountered:
Should be fixed with #11664.
Sorry, something went wrong.
rwjblue
Successfully merging a pull request may close this issue.
Tested on
1.13.3
Unit testing a route's actions via
route.send
is now broken, asthis.router
(https://github.com/emberjs/ember.js/blob/v1.13.3/packages/ember-routing/lib/system/route.js#L1082) refers to the service (router.router
isundefined
) and theelse
conditional never hits.Sample test to reproduce:
Related – #9820
The text was updated successfully, but these errors were encountered: