Write unit tests for JS/CSS minifier. As we find the odd boundary/wrong minification, they should be logged to prevent regressions
Version: unspecified
Severity: enhancement
Write unit tests for JS/CSS minifier. As we find the odd boundary/wrong minification, they should be logged to prevent regressions
Version: unspecified
Severity: enhancement
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T28676 Milestone: MediaWiki 1.17 release tarball (tracking) | |||
Resolved | • TrevorParscal | T29528 JS minification still outputs incorrect javascript for some input | |||
Resolved | Krinkle | T29395 Write unit tests for JavaScriptMinifier, CSSMin and CSSJanus |
I added a basic testing framework for JS minifier in r82648, but can't really cover all cases because those regexes are write-only.
mhershberger wrote:
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
(In reply to comment #2)
I added a basic testing framework for JS minifier in r82648, but can't really
cover all cases because those regexes are write-only.
Can you elaborate what you mean? Also, why are the js snippets in separate files?
(In reply to comment #4)
(In reply to comment #2)
I added a basic testing framework for JS minifier in r82648, but can't really
cover all cases because those regexes are write-only.Can you elaborate what you mean? Also, why are the js snippets in separate
files?
Ah, looks like it has changed in the mean time. We've got a pretty good coverage of CSS minification tests now:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=tree;f=tests/phpunit/includes/libs;h=779b41ecc126eb57dd88cbf523d15b8b9a549ac0;hb=HEAD
Just need some for CSS.
(In reply to comment #1)
bug 26931
bug 27046
bug 27054
bug 27052
Added test cases for bug 26931 and bug 27046 in I7a4df097108ec05bc58d5a110329e13ff9587c8a.
bug 27054 wasn't a bug in the minifier and has been solved in ResourceLoader).
Working on CSSMin and CSSJanus now.
CSSMin: 41759f322ce9e7471f6f8ade6175354f6d5df942
CSSJanus: If40c5de54bffae6e5ac8fac81754a53a40c652b1