Skip to content

tests(audits): Return type correction (LH.Audit.Result -> LH.Audit.Product)#10270

Merged
paulirish merged 1 commit into
GoogleChrome:masterfrom
jayaddison:tests-fixup-error-return-type
Jan 28, 2020
Merged

tests(audits): Return type correction (LH.Audit.Result -> LH.Audit.Product)#10270
paulirish merged 1 commit into
GoogleChrome:masterfrom
jayaddison:tests-fixup-error-return-type

Conversation

@jayaddison

Copy link
Copy Markdown
Contributor

Summary
Change #10072 used the Audit.generateErrorAuditResult function to generate a return value, but this return value is of type LH.Audit.Result, when the caller is expecting LH.Audit.Product.

Since the returned value we expect is a relatively simple type, here we construct the relevant fields (score, errorMessage) directly instead.

Related Issues/PRs
#10072

@paulirish paulirish merged commit c54dfcd into GoogleChrome:master Jan 28, 2020
@jayaddison jayaddison deleted the tests-fixup-error-return-type branch January 28, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants