0

I came up with these lines to test if an R list contains a certain element at a given index (supplied by purrr::pluck syntax):
library(testthat)
expect_list_contains <- function(object, val, ...) {
# 1. Capture object and label
act <- quasi_label(rlang::enquo(object), arg = "object")
# 2. ...