#52860 closed defect (bug) (fixed)
Ignore jquery migrate console warnings when running e2e tests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
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.
Change History (7)
This ticket was mentioned in PR #1106 on WordPress/wordpress-develop by tellthemachines.
3 years ago
#1
- Keywords has-patch has-unit-tests added
#3
@
3 years ago
@isabel_brison are these errors being triggered by code within the devDependencies
? Or within Core code? If the former, would ignoring these warnings result in deprecated patterns in Core code being missed? I know that jQuery Migrate is slated to be removed from Core eventually, but it's still included for the time being.
The 5.8 cutoff is today, but test improvements are allowed at any time, so this can stay for the time being.
#4
@
3 years ago
There's a couple uses of $.isFunction()
in Twenty Seventeen, and the rest of the warnings are coming from jQuery UI. The warnings also appear in the browser console when running a dev environment though, so we won't miss them if we remove them from the e2e tests. And the benefit of removing them is the test results become much more readable, as all the warnings are currently being output after each test.
#6
@
3 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 51130:
hellofromtonya commented on PR #1106:
2 years ago
#7
Committed via changeset https://core.trac.wordpress.org/changeset/51130.
Trac ticket: https://core.trac.wordpress.org/ticket/52860