local_edition() allows you to temporarily (within a single test or a single test file) change the active edition of testthat.

local_edition(x, .env = parent.frame())

Arguments

x

Edition Should be a single integer.

.env

Environment that controls scope of changes. For expert use only.