Bug Tracker

Ticket #4578: verify_undefined_selector.diff

File verify_undefined_selector.diff, 786 bytes (added by subtlegradient, 7 years ago)

unit test to verify fix and catch any future regressions

  • jquery/test/unit/core.js

     
    1212});
    1313
    1414test("jQuery()", function() {
    15         expect(8);
     15        expect(9);
    1616
    1717        var main = jQuery("#main");
    1818        isSet( jQuery("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
     
    5050        equals( jQuery([1,2,3]).get(1), 2, "Test passing an array to the factory" );
    5151
    5252        equals( jQuery(document.body).get(0), jQuery('body').get(0), "Test passing an html node to the factory" );
     53
     54        equals( jQuery(undefined).get(0), jQuery('shouldnotexist').get(0), "Test passing undefined node to the factory" );
    5355});
    5456
    5557test("selector state", function() {