Skip to content
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

tests(smoke): add smoke test code coverage #4967

Merged
merged 1 commit into from
Apr 14, 2018
Merged

tests(smoke): add smoke test code coverage #4967

merged 1 commit into from
Apr 14, 2018

Conversation

brendankenny
Copy link
Member

Since:

it's now easy to add smoke test coverage :)

Run locally with yarn coverage:smoke and on codcov you get little unit/smoke tabs at the top of file views (e.g. report-generator.js). In codecov you seem to only get those tabs in individual files, both tabs are selected at first by default, and the coverage numbers on the left may be the sum of the two? So the view is a little shaky if you're interested in comparing unit vs smoke coverage, but it's nice that if you want the union of the two you can see that as well without uploading yet another coverage file.

@brendankenny
Copy link
Member Author

oh, the big gotcha here is that if a function will be toString()ed and then passed to driver.evaluateAsync() or driver.evaluteScriptOnNewDocument() it must have a /* istanbul ignore next */ above it or nyc will instrument it and it will throw when then stringified and run in the browser.

Not an issue for (almost all of) the unit tests, but the smokehouse expectations will fail with gatherer errors if the code can't run. I can't think of a great way to automate doing this or checking it, so we'll rely on vigiliance?

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweeeeeeeeet

Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the big gotcha here is that if a function will be toString()ed

moving all these to *-pagefunctions.js will make this much more straightforward.

@paulirish paulirish merged commit 9d10641 into master Apr 14, 2018
@paulirish paulirish deleted the smokecov branch April 14, 2018 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants