QUnit.newMwEnvironment: Disable mw.log#warn while copying mw.config
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 20 Feb 2014 07:06:05 +0000 (08:06 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 20 Feb 2014 07:38:42 +0000 (08:38 +0100)
commit9a3e82f91914a4911efaa16902fddb2a2fe126b0
treec658e8229a310d31de81e70d65aa7f27c42f1cc3
parentf88fcb746139b5f1da6c319689a551fb89f17b91
QUnit.newMwEnvironment: Disable mw.log#warn while copying mw.config

As of 89a8fe4, mw.log#warn is available in non-debug mode so that
e.g. MWDeprecationWarning are emitted whenever such property is
accessed.

Due to the way QUnit.newMwEnvironment makes a copy of the live
config for the duration of a test run (using $.extend) this
causes all the accessors to be triggered.

As a result the qunit log is inflated to 100s of MWDeprecationWarning
entries before every single test:

 http://integration.wikimedia.org/ci/job/mediawiki-core-qunit/16525/console

Using Object.create (with polyfill) doesn't work since mw.Map#get
only resolves own properties.

Change-Id: I7285c56bd1ae7ef2efae15ee0427eeb77bc240ac
tests/qunit/data/testrunner.js