-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
fix: parse statusText from the extraInfo event #7798
Conversation
@josepharhar PTAL (extracted your change from #7640) |
Does this include the test I added with empty status text? |
Overlooked it: I am gonna add it in a moment. |
0394fb0
to
6ad0b24
Compare
6ad0b24
to
3823a21
Compare
const firstLine = extraInfo.headersText.split('\r', 1)[0]; | ||
if (!firstLine) return; | ||
const match = firstLine.match(/[^ ]* [^ ]* (.*)/); |
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.
It would be great to have unit testы on this parsing.
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.
yeah, the reason is that Puppeteer does not have unit tests. The tests that are called "unit" are added with this PR (one existing test and one empty status text test).
It would be really great to have the parsing unit-tested. If you have some strong reasons not to do it, please clarify them and go ahead with merging. |
Issues: #7458