tests/testthat/test-top_songs.R

example_top_songs <- top_songs(test_path("StreamingHistory1.json"))
usethis::use_data(example_top_songs, overwrite = TRUE)
test_that("top songs works", {

  res <- top_songs(test_path("StreamingHistory1.json"))

  expect_equal(example_top_songs, res)

})
sophiebmoore00/streamR documentation built on April 30, 2022, 6:16 p.m.