computmaxer / karma-jspm

Other
74 stars 50 forks source link

Files in jspm_packages are ignored #41

Open hadrienl opened 9 years ago

hadrienl commented 9 years ago

Hi,

I want to test an aurelia.io project which uses jpsm. To be able to work with bluebird promises, I have to load its file before loading system.js in browser mode. So, in Karma, I have added its path in files array. But the file is not loaded because karma-jspm ignore all files located into jspm_package. I found a workaround by copying the bluebird.js file in another location. The file is now well loaded and my tests passes but I would prefer to keep my files in jspm_package folder. What can I do ?

guybedford commented 9 years ago

Did you try reading some of the suggestions in https://github.com/Workiva/karma-jspm/issues/24?

hadrienl commented 9 years ago

I wasn't very clear. Aurelia.io needs to load bluebird before System.js. I need to load it in a classic way and not with jspm. But the file is located in jspm_packages folder. The file should be accessible. It is when the app load in browser mode. But when I display karma's debug log, I see that all files located in jpsm_packages are ignored, so, even if I set its path in files attribute, it's ignored.

capture d ecran 2015-03-02 20 28 35

guybedford commented 9 years ago

An alternative may be to try karma SystemJS - https://github.com/rolaveric/karma-systemjs.

hadrienl commented 9 years ago

Thanks, I'll test.