[wp-trac] [WordPress Trac] #52860: Ignore jquery migrate console warnings when running e2e tests

WordPress Trac noreply at wordpress.org
Fri Mar 19 03:53:34 UTC 2021


#52860: Ignore jquery migrate console warnings when running e2e tests
------------------------------+-----------------------------
 Reporter:  isabel_brison     |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 When running e2e tests, console warnings generated by the jquery migrate
 script are output, creating a lot of noise that makes browsing the test
 results unnecessarily painful. E.g. this is output several times per test:


 {{{
 console.warn
     JQMIGRATE: jQuery.isFunction() is deprecated

       113 |
       114 |             // eslint-disable-next-line no-console
     > 115 |             console[ logFunction ]( text );
           |             ^
       116 |     } );
       117 | }
       118 |

       at config/bootstrap.js:115:3
       at
 ../../node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:62
           at Array.map (<anonymous>)
       at Object.emit
 (../../node_modules/puppeteer/lib/cjs/vendor/mitt/src/index.js:51:43)
       at Page.emit
 (../../node_modules/puppeteer/lib/cjs/puppeteer/common/EventEmitter.js:72:22)
       at Page._addConsoleMessage
 (../../node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:757:14)
       at Page._onConsoleAPI
 (../../node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:700:14)

 }}}

 We should add something in the e2e setup to ignore these warnings.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52860>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list