https://bugzilla.wikimedia.org/show_bug.cgi?id=44299
--- Comment #7 from [email protected] --- (In reply to comment #2) > S, could you please create a page that should fail a test? ... > I do not trust a test that I did not see fail first. You have to craft an extension with a ResourceLoader module that fails, and then visit a page that loads that module. I could check in a version of an extension that fails, or you could roll back to a version of AFT, postEdit, etc. that had a JavaScript error. Instead, I took advantage of a feature of Extension:E3Experiments: it loads all files matching lib/*.js. So if you copy the attached file into extensions/E3Experiments/lib/, then any wiki page that loads ext.Experiments.lib or another module that depends on it will encounter mw.loader.getState( 'ext.Experiments.lib' ) === "error" Currently E3Experiments' own ext.Experiments.experiments and ext.Experiments.acux modules depend on this, and E3Experiments adds the former to every page in a BeforePageDisplayHook. So, on any wiki page at least twomodules will be in state "error" so long as RL is not in debug mode. In debug mode (with ?debug=1 or the resourceLoaderDebug cookie set to true) then the modules are in state "ready" despite the runtime error in one of the module's scripts. If you give me some pointers I can try adding an assertion to Cucumber. (In reply to comment #4) > module test suites already naturally > result in a test failure if the module is not loaded (0 tests is considered a > failure). And if the tests load but the core module does not then all tests > will fail naturally. This is not my experience, running fairly recent http://localhost/wiki/index.php/Special:JavaScriptTest/qunit in non-debug mode with this bad .js file hack to cause errors: * There's no report from qunit that any modules are in "error" state. * The E3Experiments qunit test is silently omitted from the list of tested modules and the dropdown, but there's no warning. * If I force the E3Experiments test to run with http://localhost/wiki/index.php/Special:JavaScriptTest/qunit?module=ext.E3Experiments.standalone , it reports "0 tests of 0 passed, 0 failed", but otherwise looks OK. The E3Experiments qunit test is very incomplete, it can run standalone and barely tests any functionality. But mw.loader.getState( 'ext.Experiments.tests' ) is "error" also, so I would expect some notification from qunit that there was a problem. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
