gruntjs - Accessing Karma Configurations from a Jasmine Unit Test -


i wondering if possible access settings defined within karma.config.js file, , if how?

i'm using grunt task runner perform various tasks building, linting, packaging, etc. i'm using grunt kick off karma test runner run jasmine unit tests. furthermore, i'm pulling in jasmine-jquery library can define , read in json , html fixtures separate files setup earlier.

while writing new tests, noticed redefining fixtures base path in every test file. decided pull out , put global constant.

the problem i'm having should define it. currently, have file named "testsettings.js" i'm including in karma configuration, define configuration object , set window.testsettings. thats , good, think better if defined within karma configuration , referenced tests. there doesn't way this... or there?

my library versions are:

"karma": "~0.12.32" "karma-jasmine": "~0.3.5" "karma-jasmine-jquery": "~0.1.1" 


Comments