Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeltan committed Sep 13, 2022
1 parent 54ea162 commit 9b0d233
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-viz_autographr.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,11 @@ test_that("edge colours graph correctly", {
test_brandes2 <- autographr(ison_brandes2, edge_color = "tiecolour")
expect_false(is.null(test_brandes2$layers[[1]]$mapping$edge_colour))
})

# Named networks
test_that("named networks plot correctly", {
onemode <- autographr(ison_adolescents)
twomode <- autographr(ison_southern_women)
expect_equal(onemode[["data"]][["name"]], node_names(ison_adolescents))
expect_equal(twomode[["data"]][["name"]], node_names(ison_southern_women))
})

0 comments on commit 9b0d233

Please sign in to comment.