[wp-trac] [WordPress Trac] #45785: Update to Underscore 1.9.1

WordPress Trac noreply at wordpress.org
Thu Sep 12 10:16:11 UTC 2019


#45785: Update to Underscore 1.9.1
------------------------------------+-----------------------
 Reporter:  mukesh27                |       Owner:  desrosj
     Type:  enhancement             |      Status:  reopened
 Priority:  normal                  |   Milestone:  5.3
Component:  External Libraries      |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch early commit  |     Focuses:
------------------------------------+-----------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Reopening to address [https://travis-ci.com/WordPress/wordpress-
 develop/jobs/234160020 test failures]:
 {{{
 >> tinymce.obsolete - HTML elements non-conforming to HTML 5.0
 >> Message: TypeError: undefined is not an object (evaluating 'a.replace')
 >> Actual: null
 >> Expected: undefined
 >> file:///home/travis/build/WordPress/wordpress-develop/build/wp-
 includes/js/underscore.min.js:1

 >> tinymce.obsolete - HTML elements non-conforming to HTML 5.0
 >> Message: Expected 6 assertions, but 7 were run
 >> Actual: null
 >> Expected: undefined
 >> test at file:///home/travis/build/WordPress/wordpress-
 develop/tests/qunit/vendor/sinon-qunit.js:61:21
 }}}

 The failures come from `tests/qunit/wp-includes/js/tinymce/tinymce-
 obsolete.js`, however renaming that file just leads to similar failures in
 other files.

 It's also worth noting that the failures are inconsistent, sometimes I get
 a different message:
 {{{
 >> Video Media Widget - video widget control renderPreview
 >> Message: TypeError: undefined is not an object (evaluating 'a.replace')
 >> Actual: null
 >> Expected: undefined
 >> file:///S:/home/wordpress.test/develop.svn.wordpress.org/build/wp-
 includes/js/underscore.min.js:1
 }}}

 I was able to track down the issue to
 [https://github.com/jashkenas/underscore/commit/f812ba7b00e97a332d5d7374f8a6afaf2576ca50
 #diff-0f36b362a0b81d6f4d4bfd8a7413c75d this commit cleaning up the
 _.debounce() function], before that commit the tests pass successfully.

 Not sure what's specifically causing the issue here, I guess there's some
 kind of a race condition between Underscore's `_.debounce()` and QUnit's
 internal timeout handling.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45785#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list