1- # test_that("Testing autoFlow while ignoring dynamic date", {
2- # taxa <- metagenomics$new(
3- # biomData = "input/metagenomics/biom_with_taxonomy_hdf5.biom",
4- # metaData = "input/metagenomics/metadata.tsv",
5- # treeData = "input/metagenomics/rooted_tree.newick"
6- # )
1+ test_that(" Testing autoFlow while ignoring dynamic date" , {
2+ taxa <- metagenomics $ new(
3+ biomData = " input/metagenomics/biom_with_taxonomy_hdf5.biom" ,
4+ metaData = " input/metagenomics/metadata.tsv" ,
5+ treeData = " input/metagenomics/rooted_tree.newick"
6+ )
77
8- # taxa$autoFlow(filename = paste0(getwd(), "/report.html"))
8+ taxa $ autoFlow(filename = paste0(getwd(), " /report.html" ))
99
10- # # Define a transform function to replace dates (e.g., YYYY-MM-DD) with a placeholder
11- # transform_fn <- function(x) {
12- # gsub("\\d{4}-\\d{2}-\\d{2}", "<DATE>", x)
13- # }
10+ # Define a transform function to replace dates (e.g., YYYY-MM-DD) with a placeholder
11+ transform_fn <- function (x ) {
12+ gsub(" \\ d{4}-\\ d{2}-\\ d{2}" , " <DATE>" , x )
13+ }
1414
15- # expect_snapshot_file("report.html", transform = transform_fn)
16- # file.remove("report.html")
17- # })
15+ expect_snapshot_file(" report.html" , transform = transform_fn )
16+ file.remove(" report.html" )
17+ })
0 commit comments