Skip to content

Commit d28a990

Browse files
Added some tests related to prototype inheritance issues
1 parent 9d7955d commit d28a990

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

test/modules/attributes.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,14 @@ describe ( 'Attributes', { beforeEach: getFixtureInit ( fixture ) }, function ()
340340

341341
});
342342

343+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
344+
345+
var ele = $('.event');
346+
347+
t.is ( ele.prop ( 'constructor' ), ele[0].constructor );
348+
349+
});
350+
343351
});
344352

345353
describe ( '$.fn.removeAttr', function ( it ) {

test/modules/css.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ describe ( 'CSS', { beforeEach: getFixtureInit ( fixture ) }, function () {
8181

8282
});
8383

84+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
85+
86+
var ele = $('.css');
87+
88+
ele.css ( 'constructor', '3px' );
89+
90+
t.is ( ele.css ( 'constructor' ), '3px' );
91+
92+
});
93+
8494
});
8595

8696
});

test/modules/events.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,16 @@ describe ( 'Events', { beforeEach: getFixtureInit ( fixture ) }, function () {
355355

356356
});
357357

358+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
359+
360+
var ele = $('.event');
361+
362+
ele.on ( 'valueOf', function () {} );
363+
364+
t.pass ();
365+
366+
});
367+
358368
});
359369

360370
describe ( '$.fn.one', function ( it ) {
@@ -544,6 +554,16 @@ describe ( 'Events', { beforeEach: getFixtureInit ( fixture ) }, function () {
544554

545555
});
546556

557+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
558+
559+
var ele = $('.event');
560+
561+
ele.off ( 'valueOf', function () {} );
562+
563+
t.pass ();
564+
565+
});
566+
547567
});
548568

549569
describe ( '$.fn.ready', function () {
@@ -726,6 +746,16 @@ describe ( 'Events', { beforeEach: getFixtureInit ( fixture ) }, function () {
726746

727747
});
728748

749+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
750+
751+
var ele = $('.event');
752+
753+
ele.trigger ( 'valueOf' );
754+
755+
t.pass ();
756+
757+
});
758+
729759
});
730760

731761
});

test/modules/utilities.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ describe ( 'Utilities', function () {
243243

244244
});
245245

246+
it.skip ( 'doesn\'t have prototype inheritance issues', function ( t ) {
247+
248+
var constructor = $('<constructor>CONTENT</constructor>');
249+
250+
t.is ( constructor.html (), 'CONTENT' );
251+
252+
});
253+
246254
});
247255

248256
describe ( '$.unique', function ( it ) {

0 commit comments

Comments
 (0)