tests/testthat/test-FastqcFile.R

context("Check Basic Structure of .FastqcFile")

test_that(".FastqcFile can be formed from zip archive", {
  fl <- system.file("extdata", "ATTG_R1_fastqc.zip", package = "ngsReports")
  fqcFile <- .FastqcFile(fl)
  expect_equal(length(fqcFile), 1)
})

test_that(".FastqcFile can be formed from directory",{
    fl <- system.file("extdata", "exampleRNASeq_R1_fastqc", package = "ngsReports")
    fqcFile <- .FastqcFile(fl)
    expect_equal(length(fqcFile), 1)
})

test_that(".FastqcFile fails on incorrect directory structure", {
    d <- system.file("extdata", package = "ngsReports")
    expect_error(suppressWarnings(.FastqcFile(d)))
})

closeAllConnections()

Try the ngsReports package in your browser

Any scripts or data that you put into this service are public.

ngsReports documentation built on Nov. 23, 2020, 2:01 a.m.