I can't seem to get the model hooks and the actions called with unit test.
Any sample / blog making this ember-cli environment would be a great help!
I found this link. What unit test solution for routes in Ember.js?
but route.model () throws errors like: the transition is not defined.
import { test, moduleFor } from 'ember-qunit'; moduleFor('route:sample', 'SampleRoute', {
Route Example
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function (transition) { console.log("Inside before-model hook"); }, afterModel: function() { console.log("In after-model hook"); } });
Stuarty
source share