testwhat (version 4.2.2)

test_library_function: Test whether the library function was called correctly

Description

Convenience function to test in a very hacky way whether the library function was called correctly in its most simple form. There is support for the different ways to call the library function

Usage

test_library_function(package, not_called_msg = NULL, incorrect_msg = NULL)

Arguments

package
package name for which the library() function should've been called
not_called_msg
optional feedback message in case the library function wasn't called a single time
incorrect_msg
optional feedback message in case the library function wasn't called for the specified package.

Examples

Run this code
## Not run: 
# # Example solution code
# library(ggvis)
# library(dplyr)
# 
# # SCT to test both library calls:
# test_library_function("ggvis")
# test_library_function("dplyr")
# ## End(Not run)

Run the code above in your browser using DataLab