Closed DaveParr closed 5 years ago
Shouldn't this happen only when the font table is empty? I'm not sure.
I created a conflict, sorry.
Anyhow I think that on top of interactive
this question should be asked when nrow(fnt) == 0
?
Yay, thanks! Add yourself as "aut" in DESCRIPTION and then I'll merge.
To do that install the whoami
package and the desc
package and run desc::add_me(role = "aut")
.
Was just about to start writing a test for this for coveralls stopped being grumpy. Worth doing or shall I just mark it as #nocov
?
ah if you have time it'd be grand! I'd suggest doing it with mocking! Ping me if you have never done that.
@DaveParr you included yourself twice! 👯♂️
sorry to be nitpicky, but the more I think of it, the more I'd prefer a mocking approach because it seems more logical not to add testing as a condition in the code?
put nrow(extrafont::fonttable())
in a helper function called say count_fonts
then have something like so:
with_mock(
is_interactive = function() TRUE,
count_fonts = function() 0,
expect_message blabla
)
What I do not know is how to check the behavior of the package depending on what the user inputs. All of these are nice-to-have's anyway. :-)
Editing to add: testing the behavior to the user's response would be done by once again mocking something, in that case the menu
function. But not to be added in your PR, it's all nice but not necessary!
@DaveParr do you think you can edit the test (to use mocking) soon? Then I'll merge (no need to test the behavior depending on the user's input)
does the build fail locally too?
Pull Request Test Coverage Report for Build 28
💛 - Coveralls