Bug Tracker

Changes between Initial Version and Version 1 of Ticket #7654, comment 9


Ignore:
Timestamp:
Nov 30, 2010, 7:00:25 PM (12 years ago)
Author:
Rick Waldron
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7654, comment 9

    initial v1  
    11The jQuery test suite is a collection of 3688 unit tests that jQuery must pass in the browsers I listed above before it can be deemed release worthy.
    22
    3 The tests exist to aid in avoiding major unexpected regressions in the jQuery source (unless the regression is somehow intended ) from one release to another. Imagine, i make one small change - like... returning null when nothing was previously returned. No big deal right? Wrong. Javascript functions ALWAYS return something - if it is no specified then the default behaviour is to return `undefined`. So what happens when some other piece of internal jQuery code is testing a condition in which it expects `undefined` to the result of its evaluation... but now you're returning null. This is what happens:
     3The tests exist to aid in avoiding major unexpected regressions in the jQuery source (unless the regression is somehow intended ) from one release to another. Imagine, i make one small change - like... returning null when nothing was previously returned. No big deal right? Wrong. Javascript functions ALWAYS return something - if it is not specified then the default behaviour is to return `undefined`. So what happens when some other piece of internal jQuery code is testing a condition in which it expects `undefined` to the result of its evaluation... but now you're returning null. This is what happens:
    44
    5516 Failed tests spanning across the data and css modules. Only 2782 tests were allowed to run because the entire suite dies when it gets to the custom JSON-P tests.