karma-jspm
karma-jspm copied to clipboard
Will not serve test files
Possibly related to this issue but I'm not sure.
Check out this tester application
this also assumes the manual fix for issue 106
W:\karma-tester> npm run test
> [email protected] test W:\temp\karma-tester
> karma start karma.conf.js --single-run
17 10 2015 14:29:58.941:INFO [karma]: Karma v0.13.11 server started at http://localhost:9876/
17 10 2015 14:29:58.956:INFO [launcher]: Starting browser Chrome
17 10 2015 14:30:00.516:INFO [Chrome 46.0.2490 (Windows 8.1 0.0.0)]: Connected on socket sKEUZi7ZQpmqj5P4AAAA with id 30533191
17 10 2015 14:30:00.778:WARN [web-server]: 404: /Scripts/tests/tester.specs.js
Chrome 46.0.2490 (Windows 8.1 0.0.0) ERROR: 'Potentially unhandled rejection [5] Error: XHR error (404 Not Found) loading http://localhost:9876/Scripts/tests/tester.specs.js
at error (http://localhost:9876/base/jspm_packages/system.src.js?4cf2029bbbbc9b776337cc3b2c67ab2beea97a00:1028:16)
at XMLHttpRequest.xhr.onreadystatechange (http://localhost:9876/base/jspm_packages/system.src.js?4cf2029bbbbc9b776337cc3b2c67ab2beea97a00:1036:13)'
17 10 2015 14:30:10.800:WARN [Chrome 46.0.2490 (Windows 8.1 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
Finished in 10.286 secs / 0 secs
npm ERR! Test failed. See above for more details.
You'll note that the file in the 404 exists and should absolutely be served given the karma-jspm config
Seeing this in other applications now as well... Did something in how things should be configured change?
Thanks to my coworker @maniacally for tracking this down. Apparently we now need to add a proxy for this to work
'/Scripts/': '/base/'
also with latest-latest it doesn't seem like the manual fix is needed anymore
@togakangaroo I want to thank you this also resolved my issues i was having with the same problem.
+1 getting this now too.
This has probably been talked about before, but I managed to workaround it by removing the baseUrl
from the JSPM config. A proper fix it's needed, though. I'm happy to test if you ping me ;)
I don't have a BaseURL in my config or karma config. It was working fine for me until something was updated. In my case the test actually runs but it's random. It's like I need to click on the Chrome instance spawned and it will run but then that only happens ~30% of the time.
On Thu, Nov 19, 2015 at 1:25 AM Adrian Perez [email protected] wrote:
This has probably been talked about before, but I managed to workaround it by removing the baseUrl from the JSPM config. A proper fix it's needed, though. I'm happy to test if you ping me ;)
— Reply to this email directly or view it on GitHub https://github.com/Workiva/karma-jspm/issues/107#issuecomment-157987504.
+1
And removing baseUrl
from config.js
fixed the issue but this really needs to be fixed
This has probably been talked about before, but I managed to workaround it by removing the baseUrl from the JSPM config. A proper fix it's needed, though. I'm happy to test if you ping me ;)