We currently output a useless file for each test, so that Karma won't serve the real JS code in that file. This leads to duplication when debugging with sourcemaps enabled, as we'll see 2 foo.test.jss when searching files.
Well, Karma has a type on the file. Our files are currently js type (just means script, doesn't matter if the file is .ts or .jsx). And if we change the file to a dom type then Karma will treat the content as something to inject into the DOM tree. Coupled with an empty contents, make Karma skip the file, and we're left with only the virtual file from the sourcemap.
We currently output a useless file for each test, so that Karma won't serve the real JS code in that file. This leads to duplication when debugging with sourcemaps enabled, as we'll see 2
foo.test.js
s when searching files.Well, Karma has a
type
on the file. Our files are currentlyjs
type (just means script, doesn't matter if the file is.ts
or.jsx
). And if we change the file to adom
type then Karma will treat the content as something to inject into the DOM tree. Coupled with an empty contents, make Karma skip the file, and we're left with only the virtual file from the sourcemap.