From 1f014202fed3135ed31b06cfae33fb6de08b832a Mon Sep 17 00:00:00 2001 From: Zelos Zhu Date: Thu, 11 May 2023 19:48:54 +0000 Subject: [PATCH] test: #1822 add regexp for tests --- tests/testthat/test-derive_param_extreme_record.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-derive_param_extreme_record.R b/tests/testthat/test-derive_param_extreme_record.R index 585a2743b3..ea079198bc 100644 --- a/tests/testthat/test-derive_param_extreme_record.R +++ b/tests/testthat/test-derive_param_extreme_record.R @@ -110,7 +110,8 @@ test_that("derive_param_extreme_record Test 2: Error given when order variable i PARAMCD = "FIRSTACT", PARAM = "First Anti-Cancer Therapy" ) - ) + ), + regexp = "Required variable `ADT2` is missing" ) }) @@ -148,6 +149,7 @@ test_that("derive_param_extreme_record Test 3: Error given when sources is not i PARAMCD = "FIRSTACT", PARAM = "First Anti-Cancer Therapy" ) - ) + ), + regexp = "Each element of `sources` must be an object of class/type 'records_source' but the following are not:" ) })