aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2014-01-16 02:05:57 +0400
committerOleg <markelog@gmail.com>2014-01-16 03:21:25 +0400
commit92cbf5362cfe4fe52e919eecfebe8ecbe27ee5e3 (patch)
treeb311a642d8e19ab9b5da714d7bc68ef6f317c55d /test/unit
parenta3cd88f14bc99cbb80e6abe939576cbed093cb47 (diff)
downloadjquery-92cbf5362cfe4fe52e919eecfebe8ecbe27ee5e3.tar.gz
jquery-92cbf5362cfe4fe52e919eecfebe8ecbe27ee5e3.zip
Attrs: Fix valHook for option element
Fixes #14686
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/attributes.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 8ba2b4459..2b2eee425 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -1448,3 +1448,12 @@ test( "coords returns correct values in IE6/IE7, see #10828", function() {
area = map.html("<area shape='rect' coords='0,0,0,0' href='#' alt='a' />").find("area");
equal( area.attr("coords"), "0,0,0,0", "did not retrieve coords correctly" );
});
+
+test( "should not throw at $(option).val() (#14686)", 1, function() {
+ try {
+ jQuery( "<option/>" ).val();
+ ok( true );
+ } catch ( _ ) {
+ ok( false );
+ }
+});