What you would likely want to do is modify https://github.com/r-lib/testthat/blob/master/R/reporter-check.R to additionally tally expectation_warning
and then stop for warnings in a similar way to how it stops for errors.
But maybe at this point it would be better to open an issue in the testthat repository and we can consider adding a stop_for_warning
option to the check reporter.