| initializeTestthatAddin {xpectr} | R Documentation |
Initializes test_that() call
Description
Inserts code for calling testthat::test_that().
See `Details` for how to set a key command.
Usage
initializeTestthatAddin(insert = TRUE, indentation = NULL)
Arguments
insert |
Whether to insert the code via
N.B. Mainly intended for testing the addin programmatically. |
indentation |
Indentation of the code. (Numeric) N.B. Mainly intended for testing the addin programmatically. |
Details
How to set up a key command in RStudio
After installing the package. Go to:
Tools >> Addins >> Browse Addins >> Keyboard Shortcuts.
Find "Initialize test_that()" and press its field under Shortcut.
Press desired key command, e.g. Alt+T.
Press Apply.
Press Execute.
Value
Inserts code for calling
testthat::test_that().
Returns NULL invisibly.
Author(s)
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
See Also
Other addins:
assertCollectionAddin(),
dputSelectedAddin(),
initializeGXSFunctionAddin(),
insertExpectationsAddin(),
navigateTestFileAddin(),
wrapStringAddin()