testthat
testthat copied to clipboard
FR: Warn optionally on duplicate test names
Should testthat warn in this case, perhaps optionally?
library(testthat)
test_that("foo", {
expect_true(TRUE)
})
#> Test passed 🎊
test_that("foo", {
expect_true(TRUE)
})
#> Test passed 🎊
Created on 2023-08-23 with reprex v2.0.2
Reference: https://github.com/tidyverse/dplyr/pull/6901#issuecomment-1689991900
I think it would be fine for this to be an unconditional warning.
But this also doesn't seem that important to me; especially since it means that a reporter would have to keep track of every test that it's seen.