qunit.completenessTest: Unbreak regular functions with static methods
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 19 Jun 2014 06:06:45 +0000 (08:06 +0200)
committerKrinkle <krinklemail@gmail.com>
Sun, 29 Jun 2014 20:59:28 +0000 (20:59 +0000)
commitbd1786b1792237d4555c0749b163f5457130f0af
tree708724f7213699c9e106b2c374ee3da3aa143019
parent6845c3fcc82d80ad10656e15cddb4c22f5bd82c5
qunit.completenessTest: Unbreak regular functions with static methods

While it already skipped constructor functions during the injection
phase (and thus didn't affect their properties), regular functions
can have properties, too.

Due to the QUnit CompletenessTest injecting a spy in mw.log,
things like mw.log.warn became undefined and causing exceptions
to be thrown sometimes.

Fix breaking of mw.log methods (and potentially other things) by
giving letting the spy function object inherit from the original
function object.

Also reduced and simplified logic further to accomodate this new
approach.

* Give injectCheck obj/key instead of masterValue/currPath.
* Pass around obj/key instead of value/key.
* Remove 'action' parameter, only ACTION_INJECT was ever used.
* Remove logic for 'prototype', this is now included in the type function/object case.
* Remove logic for 'prototype.constructor', this exclusion works naturally
  due to constructor functions being filtered out.

Change-Id: If16db9337a99865ada0fe1c482dd62a572239030
resources/src/jquery/jquery.qunit.completenessTest.js