We've got an Angular2 project using the barrel import patte. I'm attempting to write unit tests for it, however Karma caot seem to find the modules that are referenced by the barrel statements.
The file being tested imports using:
import {provider1, provider2, provider3} from "../../../core/providers";
import {component1} from "../../controls";
And karma outputs the following waings:
13 05 2016 08:57:43.732:WARN [web-server]: 404: /base/src/app/core/providers
13 05 2016 08:57:43.732:WARN [web-server]: 404: /base/src/app/core/controls
Now the section of the karma config file that loads our client scripts:
// paths loaded via module imports
{ patte: "src/app/**/*.js", included: false, watched:
// paths to support debugging with source maps in dev tools
{ patte: "src/app/**/*.ts", included: false, watched: false },
This should load all the client scripts, but I think that since the file I am unit testing uses a barrel import, Karma doesn't know what to do with it. Neither do I...
I have attempted to add a proxy for this barrel patte, but that did not work.
What should I be doing?
