qunit.completenessTest: Ignore mw.loader.moduleRegistry
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 19 Jun 2014 06:10:16 +0000 (08:10 +0200)
committerKrinkle <krinklemail@gmail.com>
Sun, 29 Jun 2014 20:59:43 +0000 (20:59 +0000)
It was iterating over it and considering its 'script' properties
to be methods that had to be tested.

The CompletnessTest before this change is filled with stuff like:
- loader.moduleRegistry.skins.vector.js.script
- loader.moduleRegistry.mediawiki.api.script
- loader.moduleRegistry.mediawiki.Title.script
- ..

And was actually causing it to hit hard limit and thus actual
lots of actual methods were no longer inspected by the test.

Change-Id: I13fbf1224b48aa34a7bb01fdc0543023e502bb4f

tests/qunit/data/testrunner.js

index ab9aab1..50e89da 100644 (file)
                                return true;
                        }
 
+                       // Don't iterate over the module registry (the 'script' references would
+                       // be listed as untested methods otherwise)
+                       if ( val === mw.loader.moduleRegistry ) {
+                               return true;
+                       }
+
                        return false;
                };