[Bug 44488] Special:JavaScriptTest/qunit doesn't fail broken ResourceLoader modules
https://bugzilla.wikimedia.org/show_bug.cgi?id=44488 sp...@wikimedia.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from sp...@wikimedia.org --- I believe Krinkle's Change-Id: Ib6e2b8d1be3e38fd9f1b948407c62da550fce0b4 mentioned in bug 44299 fixed this, yay! To verify, I added bad code to an extension's module that is referenced by its qunit tests ( var x = window.badTypo(); near the end of extensions/GuidedTour/modules/ext.guidedTour.lib.js ) and "mediawiki.tests.qunit.testrunner Loader status" fails and lists the module and others depending on it as "Modules in error state". Note that if you have the cookie resourceLoaderDebug set to true (or if you check Enable ResourceLoaderDebug on the Special:JavaScriptTest/qunit page), then the state of the broken RL module will be "ready" in both qunit tests and regular pages that load it. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 44488] Special:JavaScriptTest/qunit doesn't fail broken ResourceLoader modules
https://bugzilla.wikimedia.org/show_bug.cgi?id=44488 Andre Klapper changed: What|Removed |Added Priority|Unprioritized |Normal -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 44488] Special:JavaScriptTest/qunit doesn't fail broken ResourceLoader modules
https://bugzilla.wikimedia.org/show_bug.cgi?id=44488 --- Comment #2 from sp...@wikimedia.org --- attachment 11696 (http://bug-attachment.wikimedia.org/attachment.cgi?id=11696, key code below) is just some JavaScript, you can add it to any module. It passes JSHint without warnings Thanks for the explanation. I thought QUnit ran the test modules you add to $testModules['qunit'] in response to the ResourceLoaderTestModules hook. If you give it a RL module that didn't load, surely *someone* should complain? function failsInIE() { var myArr = [ 42, 666 ]; if ( myArr.indexOf( 666 ) === -1 ) { return false; } } function failsEverywhere() { return window.badTypo(); } // Could call it always, could call it sometimes... failsInIE(); failsEverywhere(); -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 44488] Special:JavaScriptTest/qunit doesn't fail broken ResourceLoader modules
https://bugzilla.wikimedia.org/show_bug.cgi?id=44488 --- Comment #1 from Krinkle --- Is that js file a lib file or a test file? What do you get in the console? QUnit can/should only execute tests it is given. Test it isn't given it can't load, naturally. If a file contains a SyntaxError the module it came with will fail at run time, so anything else that module provided is not executable, this is how javascript works (nothing we can do about it). Special:JavaScriptTest/qunit?module=ext.E3Experiments.standalone showing 0/0 is misleading. the module parameter is a filter. The module you're referring to isn't loaded due to the invalid syntax, so the filter doesn't match any modules. Special:JavaScriptTest/qunit?module=blablabla yields the same result. I don't think QUnit is the place to assert syntax correctness. That's what JSHint is for, which should run before one even considers running QUnit tests. Also, in a non-automated environment the console will inform about the syntax error. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l