-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏗 Introduction of coverage-map
task.
#29519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be interested in seeing if this approach works, and if it can generate coverage numbers for minified v0.js
(and potentially, unminified amp.js
) during tests that use HTML files that in turn load the runtime and extensions from a server.
Adding @rcebulko as FYI / additional reviewer since this is relevant to coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be tweaked to allow generating coverage maps for extension files as well? The list of files to include might be a useful thing to set as a flag
Unfortunately, for whatever reason, unminified JS does not work with source map explorer - I've manually tested this. |
Maybe. Source map explorer requires the JS file, the corresponding source map, and a coverage JSON file (which we get through puppeteer tests). |
@xiexr151e looks great. just revert the root package.json and I'll approve this pull request. |
For some reason, Travis fails, but I'm not sure why this is happening. |
async function coverageMap() { | ||
installPackages(__dirname); | ||
|
||
puppeteer = require('puppeteer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erwinmombay instead of doing this, can we instead do a dynamic require in the main gulpfile.js
when we load this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry i missed this, do you mean as a global of some sort? I'll defer to @rsimha since we are following their pattern
These are due to the changes in the root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shape of this pull request is now correct. I'm approving it.
* moved script to tasks and added package requirements * lint fix * progress on making task * remove test.json * additional lint fixes * fixed according to comments * several changes in coverage-map * lint * clarify description * change to use async writefile * review flag * OK in window.scrollBy() * lint * added source-map-explorer to package.json * Some changes based on feedback * additional updated based on feedback * small change * added separate package.json * package specific changes * undo changes in root package.json * added yarn.lock * several changes * revert yarn.lock * lock file * delete package-lock.json * update gulpfile.js * lazy importing * revert change * remove package-lock * Update package.json * yarn.lock * prettify * excluded coverage-map for getComputedStyle * additional feedback Co-authored-by: Derek Tse <[email protected]>
This PR attempts to incorporate puppeteer and source map explorer into one task, and thereby automating the generation of code coverage heat maps in
v0.js
.