mediawiki.util: Improve unit tests
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 18 Sep 2018 02:59:08 +0000 (03:59 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 18 Sep 2018 03:00:41 +0000 (04:00 +0100)
commit1a625b8ced8b27cf892dc4a2d58a1b7682382b17
treeee89dd0e5b6757b93b3b27f43cbf75cc9644cda7
parentbcd98b9cd4fea907418cb83a847e8b1dad7c3a67
mediawiki.util: Improve unit tests

* Simplify fixture.
* Use more obvious example values.
* Add strict test for nodeType and nodeName on the return value.
  Previously it was only asserting the return value to be a Node,
  now it asserts it to be an html anchor element.
* Improve wording of some assertion messages.
* Line breaks.

Bug: T204625
Change-Id: I75442a4d86ac328410f0f7bc9976a2316f00cf95
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js