mediawiki.api: Make qunit failure easier to debug
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 9 Feb 2017 20:10:58 +0000 (20:10 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 9 Feb 2017 20:10:58 +0000 (20:10 +0000)
commit0267b4129f0979e158fee7e3e5ac140d5fc5969e
tree7866a8bf6f6d7477064caa85e13edcc6dc55937e
parent1a3d0d82b4809b73978f5801dc74b0dfa86bc1d7
mediawiki.api: Make qunit failure easier to debug

Avoid use of assert.ok() when there is clearly a comparison being made.
Previously the result of the comparison was implicit in match() returning
an array with a match instead of null.

Change this to instead extract the value and let QUnit see the comparison.
In case of a failure, the actual and expected values will now be reported.

Change-Id: Ieaea090469efba24f6f5bf44f5c8e238b017275f
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js