Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Fix tests by removing crayon formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Mar 29, 2021
1 parent 5a64ea5 commit 5063f06
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/testthat/test-bomrang_tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
})

0 comments on commit 5063f06

Please sign in to comment.