Closed Havunen closed 4 years ago
why this plugin does not do that out of box?
Because you did not send your PR yet?
I was more like wondering should we include this functionality into karma-sauce-launcher
or is it out of scope of this plugin
Did you try https://www.npmjs.com/package/karma-gzip?
yes, that was the point of this issue. I think developers are not aware of this fact that when you use sauce-launcher you need to manually gzip the test assets.
I think Havunen asks a pretty good question.
It looks like this could be done as a PR against karma itself, rather than tacking it onto karma-sauce-launcher. It might be as simple as adding this around line 67 of lib/web-server.js:
var compression = require('compression'); handler.use(compression());
There's a way to do by passing a callback in through the config for beforeMiddleware, but is there a good reason not to include the compression middleware by default?
The karma devs actually removed gzip support some time ago. They have also, pushed back on adding support. I was recently able to get them to accept a PR that will allow me to simplify the karma-gzip considerably in a future update.
This discussion prompted me to update karma-gzip for karma v3.1. I've also renamed the package to karma-gzip-preprocessor, which should make even easier to use.
Closing this due to inactivity, feel free to re-open if this is still an issue
@GreenGremlin
They're pushing back on precomputed gzip assets. I don't see how adding the compression library adds some sort of undo complexity to the codebase.
Hi
I was recently investigating iOS disconnect issue and found out that karma test files are not gzipped by default.
Then I started looking for solution and found this plugin
https://github.com/GreenGremlin/karma-gzip
Using that improved iOS a lot, Total test time went down from 1m 57s to 1m 28s and Bundle size went down from 4MB -> 657kb
why this plugin does not do that out of box?