From 5063f06cffaa5b0976b5ed1e92b9b8f151920487 Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Mon, 29 Mar 2021 09:36:12 +0800 Subject: [PATCH] Fix tests by removing crayon formatting --- tests/testthat/test-bomrang_tbl.R | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-bomrang_tbl.R b/tests/testthat/test-bomrang_tbl.R index 5c2b06f1..389d4c5b 100644 --- a/tests/testthat/test-bomrang_tbl.R +++ b/tests/testthat/test-bomrang_tbl.R @@ -5,14 +5,16 @@ test_that("print.bomrang_tbl() returns a proper header", { capture.output(get_historical_weather(latlon = c(-35.2809, 149.1300), type = "min")) expect_type(x, "character") - expect_equal(x[[1]], - " --- Australian Bureau of Meteorology (BOM) Data Resource ---") + expect_equal( + x[[1]], + crayon::strip_style(" --- Australian Bureau of Meteorology (BOM) Data Resource ---") + ) expect_equal(x[[2]], - " (Original Request Parameters)") + crayon::strip_style(" (Original Request Parameters)")) expect_equal(x[[3]], - " Station:\t\tCANBERRA AIRPORT [070351] ") + crayon::strip_style(" Station:\t\tCANBERRA AIRPORT [070351] ")) expect_equal(x[[4]], - " Location:\t\tlat: -35.3088, lon: 149.2004") + crayon::strip_style(" Location:\t\tlat: -35.3088, lon: 149.2004")) expect_equal(x[[5]], - " Measurement / Origin:\tMin / Historical") + crayon::strip_style(" Measurement / Origin:\tMin / Historical")) })