0

I have a html file which has the list of scripts (modules,controllers,service)to be loaded in order.

When i run this html file through karma, am getting 404 error in all the script files.

Below is the Karma file

files: [
    'src/webapp/project/webclnt/index.html',
    'src/SampleService.js',
    'tests/TestModule.js',
    ],

Below is the error

  05 07 2016 14:07:41.746:WARN [web-server]: 404: /base/src/webapp/project/Family.js
    05 07 2016 14:07:41.753:WARN [web-server]: 404: /base/src/webapp/project/Person.js

Can you help on this

user2918673
  • 141
  • 1
  • 9
  • Please Check This link... Hope this will help you... http://stackoverflow.com/questions/21067710/how-to-fix-404-warnings-for-images-during-karma-unit-testing – Shrikant Dandile Jul 05 '16 at 09:05
  • Now i have resolved the error....but i couldn't mock any service in the module..always i get Declaration error – user2918673 Jul 05 '16 at 10:06

1 Answers1

0

You do not need to specify the html file in 'files' section. Instead, you should set your proxies accordingly to access the HTML. proxies goes into the karma.conf.js itself as,

proxies:{
"src":"/base/src/"
}
TypeScripter
  • 879
  • 2
  • 10
  • 23