search

Home  >  Q&A  >  body text

angular.js - karma test package JASMINE is not defined

Recently I was watching angularJS develop the next generation of web applications. After downloading the source code, npm install karma jasmine

Run karma start karma.conf.js
Missing error: ReferenceError: JASMINE is not defined
Excuse me why?

The source code shouldn’t need to be modified, right? Is there something I didn't download properly? It doesn’t seem to be mentioned in the book, I hope someone with experience can give me some tips

伊谢尔伦伊谢尔伦2868 days ago579

reply all(1)I'll reply

  • 某草草

    某草草2017-05-15 17:10:42

    There are errors in the karma configuration file (probably because the writing method of the configuration file has changed due to different versions). I have read the book you mentioned and practiced it... I don’t have any impression. I vaguely remember that there are many Pitfalls (mostly because the current version is different from when the book was written)

    Personally, I haven’t come across anyone who uses karma in production, maybe I don’t have enough vision... I feel like this book is good for amateur hands-on practice, after all, it’s a bit behind, so I’ll give it a try

    Search randomly and search again
    I don’t know if it works

    reply
    0
  • Cancelreply