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

Use snapshot regression tests for sim_*() functions #65

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

joshwlambert
Copy link
Member

This PR updates the regression tests for sim_linelist(), sim_contacts() and sim_outbreak(), using snapshot testing (testthat::expect_snapshot()) instead of manually checking the type of data structure, column names and dimensions. This change reduces the number of lines of code required to test these functions and should be more strict in catching changes to the contents of the data structures output, which would have been missed by the previous implementation.

@joshwlambert joshwlambert added pkg infrastructure General update tasks relating to the package and not functionality internal Updates that only change internal functions labels Feb 9, 2024
@joshwlambert joshwlambert merged commit 912eb78 into main Feb 9, 2024
6 checks passed
@joshwlambert joshwlambert deleted the snapshot_reg_test branch February 9, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Updates that only change internal functions pkg infrastructure General update tasks relating to the package and not functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant