diff options
author | jeresig <jeresig@gmail.com> | 2010-09-20 20:08:57 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-09-20 20:08:57 -0400 |
commit | 4a46f3d7fbbaa0b7dab49ac815ccec78f1c45d2b (patch) | |
tree | 49faeb3d1d31468054e7736d9a61ff2061b7d97a /test/unit/data.js | |
parent | 653c04acb83cf5eeefc5b880f303cbc52ca29539 (diff) | |
download | jquery-4a46f3d7fbbaa0b7dab49ac815ccec78f1c45d2b.tar.gz jquery-4a46f3d7fbbaa0b7dab49ac815ccec78f1c45d2b.zip |
Fixing the problem with data-* based numbers as mention by @jasonwebster in 20673d7.
Diffstat (limited to 'test/unit/data.js')
-rw-r--r-- | test/unit/data.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/data.js b/test/unit/data.js index c7307bfd6..9d43cb59a 100644 --- a/test/unit/data.js +++ b/test/unit/data.js @@ -158,7 +158,7 @@ test(".data(String) and .data(String, Object)", function() { }); test("data-* attributes", function() { - expect(19); + expect(20); var div = jQuery("<div>"), child = jQuery("<div data-myobj='old data' data-ignored=\"DOM\"></div>"); @@ -183,12 +183,14 @@ test("data-* attributes", function() { .attr("data-true", "true") .attr("data-false", "false") .attr("data-five", "5") + .attr("data-point", "5.5") .attr("data-null", "null") .attr("data-string", "test"); equals( child.data('true'), true, "Primitive true read from attribute"); equals( child.data('false'), false, "Primitive false read from attribute"); equals( child.data('five'), 5, "Primitive number read from attribute"); + equals( child.data('point'), 5.5, "Primitive number read from attribute"); equals( child.data('null'), null, "Primitive null read from attribute"); equals( child.data('string'), "test", "Typical string read from attribute"); |