The issue has been solved
Currently, the tests are not ran on the bundle we generate. It would be nice if we did this to make sure the bundle we ship works and we didn't forget something in the webpack config for instance.

What problems did you encounter when trying it? I get module not found
although it's clearly there.
posted by kevva over 7 years ago
The thing is that running tsc
compiles all the code to dist
. But, running webpack
, only emits one bundle together with the type definitions, no tests are being compiled.
This means that if we run webpack
first and then run tsc
, the webpack bundle will be overwritten again.
This is what I came up with so far
"pretest": "npm run compile && del 'dist/**/*.js' '!dist/test/**/*.js' && webpack"
The only downside is that the code coverage is foobar. Maybe we can fix this by tweaking the webpack config.
posted by SamVerschueren over 7 years ago
posted by IssueHuntBot about 6 years ago 
Ugh, this is what I end up with

Probably because the bundle contains all of the node_modules
etc.
I still believe this is the best way to test ow
to be sure the bundle we ship works. But this looks ugly...
posted by SamVerschueren almost 6 years ago
Alternatively, we could keep the tests as is, and just add one validation test that that bundle works. We don't really need to run all tests on bundle, right?
posted by sindresorhus almost 6 years ago
posted by issuehunt-app[bot] over 4 years ago