tests/testthat/test_modes.R

####################
# Tests start here #
####################

# .make_redDimPlot/.scatter_plot ----

test_that("modeGating returns a Shiny app",{

  plot_count <- 6
  # rv <- rowVars(logcounts(sce))
  # top_var <- head(order(rv, decreasing = TRUE), plot_count*2)
  # top_var_genes <- rownames(sce)[top_var]

  plot_features <- data.frame(
      x = head(rownames(sce), plot_count),
      y = tail(rownames(sce), plot_count),
      stringsAsFactors = FALSE
   )

  # launch the app itself ----

  app <- modeGating(sce, features = plot_features, featAssayMax = 12)

  # return value is a named list
  expect_s3_class(
    app,
    "shiny.appobj"
  )

})
csoneson/iSEE documentation built on Nov. 5, 2018, 11:43 p.m.