These are chat archives for systemjs/systemjs

Sep 2015
λex Vincent
Sep 03 2015 07:41
Sep 03 2015 09:56
Hi all, I have been looking at getting testing working with my systemjs code. After some experimentation I've got karma, jasmine and systemjs playing well together (ish coverage report only lists the files I've imported and not all the app files..yet)
my question is how would I swap out an import for a specific file in a test?
Sep 03 2015 10:02
e.g. Webpack example: var thingToTestInjector = require('inject?../../dependencytoswapout!../../filethatusesthatdependency); and then later on: var thingToTest = thingToTestInjector({"../../dependencytoswapout":{myapi:localfunction}});
I was thinking System.set but that would swap it out for all tests unless I get the original first and then set it back after the tests?
Sep 03 2015 11:20
Currently using path in system config, would calling system config and passing a packing that remaps the child dependency work? (Again it would be good to reset this after the test runs)
Sean Anderson
Sep 03 2015 23:52
Is there a way to load an external dependency not from a CDN? I get CORS errors when I try System.import(''); Should I just settle for appending a script tag to the DOM in this scenario?