Skip to content

use file_coverage for package with internal functions #600

@Naikless

Description

@Naikless

I am starting to introduce unittests to a package that didn't have them before, meaning that I have only implemented them for a few of the package scripts yet.

For this reason, I would like to test coverage only for specific files of the package. As far as I understand, this should be possible with

file_coverage( source_files = "source.R",  test_files = "test-source.R")

However, I run into the problem that calls to package functions inside these tests produce could not find function errors.
Is this to be expected?

package_coverage works but takes a lot longer. Is there any other way this could be achieved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions