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

Improve Test Coverage to 97+% #280

Open
Tracked by #274
strawgate opened this issue Apr 22, 2024 · 1 comment
Open
Tracked by #274

Improve Test Coverage to 97+% #280

strawgate opened this issue Apr 22, 2024 · 1 comment
Milestone

Comments

@strawgate
Copy link
Collaborator

We should investigate and outline a plan to refactor tests to:

  1. Target more, smaller, unit tests
  2. Implement Pytest Snapshot functionality and convert most (if not all) document reference comparisons to just using snapshots
  3. Identify and document a plan to improve test coverage in each component

I'll use this document to track progress

@strawgate strawgate changed the title Improve Test Coverage Improve Test Coverage to 97+% Apr 22, 2024
@legrego
Copy link
Owner

legrego commented Apr 23, 2024

Implement Pytest Snapshot functionality and convert most (if not all) document reference comparisons to just using snapshots

If we plan to eventually contribute this upstream to Home Assistant, then we should follow their guidance for snapshot testing first-party components. More specifically, we need to use the same library that they do:

Snapshot testing in Home Assistant is built on top of Syrupy, their documentation can thus be applied when writing Home Assistant tests.

@legrego legrego added this to the Version 2.0 milestone May 2, 2024
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

No branches or pull requests

2 participants