Skip to content

expectations not wrapped in 'test_that()' call don't get reported #427

Description

@kevinushey

Not sure if this is intended or not, but I noticed that with the current development version of testthat tests are not reported (e.g. with the little .) when not wrapped in test_that().

Is this a regression or intended behavior?


Repro:

cd $TMPDIR
rm -rf hellotestthat
R -e 'devtools::create("hellotestthat")'
cd hellotestthat
R -e 'devtools::use_testthat()'
echo -e 'context("Hello")\nexpect_true(TRUE)\n' > tests/testthat/test-hello.R
R -e 'devtools::test()'

With old testthat:

> devtools::test()
Loading hellotestthat
Loading required package: testthat
Testing hello
Hello : .

DONE

New testthat:

> devtools::test()
Loading hellotestthat
Loading required package: testthat
Testing hello
Hello:

DONE ===========================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorreporter 📝

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions