You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert tests from karma-webpack to karma-typescript. One of the outstanding issues I have is that some tests load test data via Webpack loaders, and I'm not sure how to replicate that behavior with Karma. I'm pretty sure that this isn't a general Karma issue, though, but specific to the way karma-ts bundling works.
I asked a detailed version of the question here on SO, but briefly, I'm serving the assets with
I can hard-code the path as e.g. fetch("/base/src/app/some/module/dir/test-data/test1.xml"), but I'd rather either a) bundle the data during the build process, or b) compute the fetch path at runtime based on module metadata.
I'm trying to convert tests from
karma-webpack
tokarma-typescript
. One of the outstanding issues I have is that some tests load test data via Webpack loaders, and I'm not sure how to replicate that behavior with Karma. I'm pretty sure that this isn't a general Karma issue, though, but specific to the way karma-ts bundling works.I asked a detailed version of the question here on SO, but briefly, I'm serving the assets with
I can hard-code the path as e.g.
fetch("/base/src/app/some/module/dir/test-data/test1.xml")
, but I'd rather either a) bundle the data during the build process, or b) compute the fetch path at runtime based on module metadata.If it helps clarify, I put together a simple repro here which includes commented-out code showing what I did in Webpack.
The text was updated successfully, but these errors were encountered: