diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2017-08-01 09:52:45 -0700 |
---|---|---|
committer | Timmy Willison <4timmywil@gmail.com> | 2017-12-18 12:27:38 -0500 |
commit | ecd8ddea33dc40ae2a57e4340be03faf2ba2f99b (patch) | |
tree | d0f248befa82620226708059db84bc3a7f1ec076 /test/unit/offset.js | |
parent | e84d3bc02eddeb0e0ca0438952ac560a794ff463 (diff) | |
download | jquery-ecd8ddea33dc40ae2a57e4340be03faf2ba2f99b.tar.gz jquery-ecd8ddea33dc40ae2a57e4340be03faf2ba2f99b.zip |
Tests: Add support for running unit tests via grunt with karma
- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
- customContextFile & customDebugFile
- Add 'npm run jenkins' script
Close gh-3744
Fixes gh-1999
Diffstat (limited to 'test/unit/offset.js')
-rw-r--r-- | test/unit/offset.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/offset.js b/test/unit/offset.js index 8e0cd7275..61f762eea 100644 --- a/test/unit/offset.js +++ b/test/unit/offset.js @@ -771,12 +771,12 @@ QUnit.test( "offsetParent", function( assert ) { assert.equal( div[ 0 ], document.documentElement, "The html element is the offsetParent of the body." ); assert.equal( div[ 1 ], jQuery( "#nothiddendiv" )[ 0 ], "The div is the offsetParent." ); - area = jQuery( "#imgmap area" ).offsetParent(); - assert.equal( area[ 0 ], document.documentElement, "The html element is the offsetParent of the body." ); + area = jQuery( "<map name=\"imgmap\"><area shape=\"rect\" coords=\"0,0,200,50\"></map>" ).appendTo( "body" ).find( "area" ); + assert.equal( area.offsetParent()[ 0 ], document.documentElement, "The html element is the offsetParent of a map area." ); + area.remove(); div = jQuery( "<div>" ).css( { "position": "absolute" } ).appendTo( "body" ); assert.equal( div.offsetParent()[ 0 ], document.documentElement, "Absolutely positioned div returns html as offset parent, see #12139" ); - div.remove(); } ); |