karma-jspm icon indicating copy to clipboard operation
karma-jspm copied to clipboard

Files in jspm_packages are ignored

Open hadrienl opened this issue 9 years ago • 4 comments

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 ?

hadrienl avatar Mar 02 '15 19:03 hadrienl

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

guybedford avatar Mar 03 '15 09:03 guybedford

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

hadrienl avatar Mar 03 '15 09:03 hadrienl

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

guybedford avatar Mar 03 '15 09:03 guybedford

Thanks, I'll test.

hadrienl avatar Mar 03 '15 09:03 hadrienl