How to test Angularjs route's resolve value on component?
问题 I'm using angular@1.5.8 and resolve some resource at the route level for one of my component. The component works as expected but my test fails now. Error PhantomJS 2.1.1 (Linux 0.0.0) module ag.expense-claim ExpenseClaimController: should load data FAILED TypeError: undefined is not an object (evaluating 'vm.attachedReceipts.results') (line 16) ExpenseClaimViewController@app/expenses/expense_claim.js:16:50 ExpenseClaimViewController@[native code] instantiate@node_modules/angular/angular.js