Open rDr4g0n opened 8 years ago
The solution I am trying now is to have a test.js
that imports all of the individual spec files and making that the entrypoint. Something like:
"use strict";
// entrypoint for unit tests
import "myLibCore.spec.js";
import "SomeModule/someModule.spec.js";
import "AnotherModule/anotherModule.spec.js";
import "utils.spec.js";
But this adds another layer of effort for the dev who is adding tests for a new module. I am considering automating creation of this file before the test build begins.
Unfortunately, bundling everything using rollup has the added side effect of causing all of jasmine's failure messages in the console to be attributed to "test.js" instead of the individual spec file :(
@rDr4g0n did you figure this out?
Unfortunately, my proposed workaround is the only solution i have found. I have moved to using webpack and there are a number of preconfigured webpack + test runner that work out of the box.
Thanks rDr4g0n!
Your suggestion lead me to investigate how they do it in the Webpack world, which helped me to resolve the issues I was having.
Can you extend your demo to show the cleanest way to rollup multiple spec files?