aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/data.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index d813ec82d..2f9c25ed5 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -51,6 +51,17 @@ test( "jQuery._data & _removeData, expected returns", function() {
);
});
+test( "jQuery.hasData no side effects", function() {
+ expect(1);
+ var obj = {};
+
+ jQuery.hasData( obj );
+
+ equal( Object.getOwnPropertyNames( obj ).length, 0,
+ "No data expandos where added when calling jQuery.hasData(o)"
+ );
+});
+
function dataTests (elem) {
var oldCacheLength, dataObj, internalDataObj, expected, actual;