Error in `eval(code, test_env)`: object 'sim' not found

test_that("spectral clustering returns correct data format", {
clusters <- spectral(sim, verbose = FALSE)
test_that("hierarchical clustering returns correct data format", {
clusters <- hierarchical(sim, verbose = FALSE)
test_that("markov clustering returns correct data format", {
clusters <- markov(sim, verbose = FALSE)
test_that("pathwayClusters handles minClusterSize errors", {
test_that("pathwayClusters returns something for markov and hierarchical clustering", {
clusters <- pathwayClusters(sim, method = 'h')
clusters <- pathwayClusters(sim, method = 'm')
test_that("pathwayClusters returns something for spectral clustering", {
clusters <- pathwayClusters(sim, method = 's')
test_that("pathwayClusters filters out by cluster size", {
clusters <- pathwayClusters(sim, method = 's', minClusterSize = 13)
expect_true(all(clusters[ , table(ClusterID) ] >= 13))

"spectral clustering returns correct data format"
"hierarchical clustering returns correct data format"
"markov clustering returns correct data format"
"pathwayClusters returns something for markov and hierarchical clustering"
"pathwayClusters returns something for spectral clustering"
"pathwayClusters filters out by cluster size"

pathwayClusters returns something for spectral clustering