jasmine - Local path for html files -


i running jasmine tests on karma server. on tests have load image , json file test.

they depend on path. default path karma? mean if have image in directory inside .js test files how can reach file?

i have tested src="mydir/myimage.jpg" no sucess...

if use nodejs web-server run app, can add karma.conf.js :

proxies: {   '/path/to/img/': 'http://localhost:8000/path/to/img/' }, 

if don't use or want use server can define local proxy karma doesn't provide access port in use, dynamically, if karma starts on port 9876 (default), still 404 error...

proxies =  {   '/images': 'http://localhost:9876/base/images' }; 

based on this answer

related github issue more info ;)

i suggest using requirejs because karma not deal fixtures...


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -