% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tinytest_reporter.R
\name{reporter}
\alias{reporter}
\alias{report_test_results}
\alias{test_package}
\alias{test_single_file}
\title{Print Styled Tinytest Results}
\usage{
report_test_results(tiny_results, utf8 = .qol_messages[["format"]][["utf8"]])

test_package(package_name, multithread = FALSE)

test_single_file(file_name)
}
\arguments{
\item{tiny_results}{The results produced by tinytest.}

\item{utf8}{Whether to display complex characters or just plain text.}

\item{package_name}{Name of the package to test.}

\item{multithread}{FALSE by default. Whether to run tests multithreaded.
NOTE: To make this work you have to manually run \code{\link[devtools:install]{devtools::install()}} first.}

\item{file_name}{Name of the file to test.}
}
\value{
Returns the results.
}
\description{
Styles the results of tinytest to get a better visual overview.

\code{\link[=test_package]{test_package()}}: Runs all set up unit tests with tinytest and outputs the results with the
custom reporter.

\code{\link[=test_single_file]{test_single_file()}}: Runs a single unit test file with tinytest.
}
\examples{
# Example results
result_file <- system.file("extdata", "qol_tinytest_results.fst", package = "qol")
results     <- load_file(dirname(result_file), basename(result_file))

# Display results
results |> report_test_results()

# Normally you would do this:
# tinytest::test_all("PATH TO PACKAGE") |> report_test_results()
# or
# tinytest::test_package("PACKAGE NAME", testdir = "inst/tinytest") |> report_test_results()

# To test the whole package with the custom reporter use:
# test_package("qol")

}
