ReferenceError: module is not defined - Karma/Jasmine configuration with Angular/Laravel app

前端 未结 4 1086

I have an existing Angular/Laravel app in which Laravel acts as an API to the angular frontend serving only JSON data. The page that loads the angular app, index.php

4条回答
  •  面向向阳花
    2021-02-05 00:16

    Just leave this here for future searchers.

    If you are running angular unit tests in the browser directly without Karma (or in plunkr or jsfiddle ect...) Then it may be that

     
         
         
    
        
        
    
        
        
         
    

    The Mocha Setup goes BETWEEN angular and angular-mocks

提交回复
热议问题