jquery.mwExtension.test: Use better sample data for isDomElement
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 10 Dec 2014 04:38:47 +0000 (04:38 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 10 Dec 2014 05:26:05 +0000 (05:26 +0000)
commit7605f112e4e093f9005ff8a82f08352b95904d6c
treea4fcd26d1edc80a25cd7051d4f73b65034fab97b
parent0456d8e27258dd40d006ba1cc6eccee88a3c5c12
jquery.mwExtension.test: Use better sample data for isDomElement

* getElementById, getElementsByTagName()[0] and jQuery#get(0) all
  return an HTMLElement. Test that only once.
  Avoid using random internal QUnit elements like #qunit-header.
  These don't always exist (e.g. when running tests via Karma).
  If anything, it should use #qunit-fixture. But might as well
  create a simple DIV and test that.

* Use 'null' instead of getElementById('not-found'). We're
  testing isDomElement, not getElementById.

* Add test for TextNode.

* Separate tests for isDomElement and isEmpty.

Change-Id: If9284fbbd066897561ae8e679f5f7ceab9255e18
tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js