Learn R Programming

test.assessr (version 2.1.2)

get_source_test_mapping_nstf: Map R Source Files to Corresponding Test Files

Description

This internal helper function scans the `R/` and `tests/` directories of a package and attempts to match each source file with a corresponding test file based on filename similarity.

Usage

get_source_test_mapping_nstf(pkg_source_path, test_dir)

Value

A data frame with two columns:

source_file

Name of the source file in the `R/` directory.

test_file

Name of the matched test file in the `tests/` directory, or NA if no match is found.

Arguments

pkg_source_path

Character string. Path to the root of the package source directory.

test_dir

character string. directory where tests are

See Also

Other nstf_utility: check_covr_skip_testit(), create_base_tests_coverage(), create_nstf_covr_list(), create_tinytest_coverage(), get_nstf_test_path(), restrict_test_paths_to_framework(), run_covr_skip_nstf()