scotch-angular-testing icon indicating copy to clipboard operation
scotch-angular-testing copied to clipboard

TypeError: Cannot read property 'toBeUndefined' of undefined

Open nickbarban opened this issue 8 years ago • 1 comments

I'd got an error: "TypeError: Cannot read property 'toBeUndefined' of undefined" passing tutorial on the page: https://scotch.io/tutorials/testing-angularjs-with-jasmine-and-karma-part-1. Pre-pre-last block (before #Coclusion) adds new test for checking method "findById". The aim is to check the case: method will return undefined if there is not user with id assigned as parameter. What I'm doing wrong?

nickbarban avatar Sep 22 '16 07:09 nickbarban

Hi @nickbarban, could you post your code for users.js and users.spec.js here?

atom-morgan avatar Sep 22 '16 17:09 atom-morgan