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

(tentatively) adding testthat for as_api_object -- need to check arguments? #86

Merged
merged 5 commits into from
May 6, 2024
Merged

Conversation

jimrothstein
Copy link
Contributor

as_api_object does not check x is valid.

jimrothstein and others added 3 commits April 19, 2024 12:14
I originally wrote this for lists, but it also works for character vectors, and may eventually expand to other objects like data frames. Thanks for catching the mismatch! Hopefully this fix makes as much sense as this can!
@jimrothstein jimrothstein changed the title (tenatively) adding testthat for as_api_object -- need to check arguments? (tentatively) adding testthat for as_api_object -- need to check arguments? Apr 19, 2024
Good idea, but the errors were being generated by base R/weren't saying anything useful (they were the general "missing argument" messages). I've updated them to focus on the things as_api_object does specifically, to separate a failure of this function from all the places it's used within the package.
Copy link
Owner

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

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

I changed the actual test, but the general idea was good. Thanks!

@jonthegeek jonthegeek enabled auto-merge (squash) May 6, 2024 14:11
@jonthegeek jonthegeek merged commit 5cca05a into jonthegeek:main May 6, 2024
7 checks passed
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.

2 participants