This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
testing error - addMatchers is not a function #277
Closed
Description
I'm following the tutorial to learn how to use Angular. But I am getting this error when I try run the npm test command:
PhoneCat controllers PhoneListCtrl should create "phones" model with 2 phones fetched from xhr FAILED
TypeError: this.addMatchers is not a function at Object. (/Users/alex/Sites/htdocs/angular-phonecat/test/unit/controllersSpec.js:7:10)
Expected [ { name : 'Nexus S' }, { name : 'Motorola DROID' } ] to equal [ { name : 'Nexus S' }, { name : 'Motorola DROID' } ].
Error: Expected [ { name : 'Nexus S' }, { name : 'Motorola DROID' } ] to equal [ { name : 'Nexus S' }, { name : 'Motorola DROID' } ].
at Object. (/Users/alex/Sites/htdocs/angular-phonecat/test/unit/controllersSpec.js:34:28)
Chrome 45.0.2454 (Mac OS X 10.11.0) PhoneCat controllers PhoneListCtrl should set the default value of orderProp model FAILED
TypeError: this.addMatchers is not a function
at Object. (/Users/alex/Sites/htdocs/angular-phonecat/test/unit/controllersSpec.js:7:10)
Chrome 45.0.2454 (Mac OS X 10.11.0) PhoneCat controllers PhoneDetailCtrl should fetch phone detail FAILED
TypeError: this.addMatchers is not a function
at Object. (/Users/alex/Sites/htdocs/angular-phonecat/test/unit/controllersSpec.js:7:10)
TypeError: expect(...).toEqualData is not a function
at Object. (/Users/alex/Sites/htdocs/angular-phonecat/test/unit/controllersSpec.js:66:27)
Metadata
Metadata
Assignees
Labels
No labels