% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_covr_skip_nstf.R
\name{restrict_test_paths_to_framework}
\alias{restrict_test_paths_to_framework}
\title{Restrict a list of test paths to a single framework}
\usage{
restrict_test_paths_to_framework(test_path_list, framework)
}
\arguments{
\item{test_path_list}{\code{list}. Named list of candidate test paths. Known
names include \code{"testthat"}, \code{"testit"}, \code{"tinytest"},
\code{"base_tests_root"}, and optionally \code{"nonstandard_testit_root"}.}

\item{framework}{\code{character(1)} or \code{NULL}. Framework identifier
(e.g., \code{"testthat"}, \code{"testit"}, \code{"tests_base"},
\code{"tinytest"}). If \code{NULL} or empty (\code{""}), the list is
returned unchanged.}
}
\value{
\code{list}. Either:
\itemize{
  \item a single-element named list containing only the resolved framework
        path (name is the selected key), or
  \item the original \code{test_path_list} if \code{framework} is
        \code{NULL}/empty, maps to an unknown key, or the resolved key is
        absent in \code{test_path_list}.
}
}
\description{
Filters a named list of candidate test directories (typically produced by
\code{get_nstf_test_path()}) down to the entry that corresponds to a requested
framework. If no usable mapping can be made, the input list is returned
unchanged.
}
\details{
The function maps \code{framework} to a primary key in \code{test_path_list}
as follows:
\itemize{
  \item \code{"testthat"}   → \code{"testthat"}
  \item \code{"testit"}     → \code{"testit"} (falls back to
        \code{"nonstandard_testit_root"} if \code{"testit"} is \code{NULL})
  \item \code{"tests_base"} → \code{"base_tests_root"}
  \item \code{"tinytest"}   → \code{"tinytest"}
}


For \code{framework == "testit"}, if \code{test_path_list[["testit"]]} is
\code{NULL} and \code{test_path_list[["nonstandard_testit_root"]]} is present,
the latter is used instead. No directories are created or validated here; the
function only selects from the provided list.
}
\seealso{
\code{\link{get_nstf_test_path}}

Other nstf_utility: 
\code{\link{check_covr_skip_testit}()},
\code{\link{create_base_tests_coverage}()},
\code{\link{create_nstf_covr_list}()},
\code{\link{create_tinytest_coverage}()},
\code{\link{get_nstf_test_path}()},
\code{\link{get_source_test_mapping_nstf}()},
\code{\link{run_covr_skip_nstf}()}
}
\concept{nstf_utility}
\keyword{internal}
