How to make ajax request with Karma -


i have test calls function requests external csv file. reason, can't use relative path. example, have do:

d3.csv('base/a.csv', ... 

instead of being able :

d2.csv('a.csv', ... 

the second example, works fine on actual site, reason, since karma runs in base directory, have request base. how can normal relative url?

here parts of karma.conf.js customized:

basepath: '',   // frameworks use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['mocha', 'chai'],   // list of files / patterns load in browser files: [   'tests/*.js',   'bower_components/d3/d3.min.js',   'game.js',   {pattern: 'a.csv', watched: false, included: false, served: true} ], 

and here repo


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -