require(qrmarkdown)
require(testthat)
cleanlog <- function()
{
if(file.exists('testlog'))
system('rm -r testlog')
q.wd('testlog')
dir('testlog')
}
# Issue1. hard to find out how test failed
# resolution: test output when failed.
#
require(qrmarkdown)
cleanlog()
# Create Rmarkdown report has error
RCode <- "stop (' Rmark down exception!!! ') "
# create rmarkdown test throw execption
jid <- q.push(name='test rmarkdown failer', code=RCode)
#find out if this failed.
res <- q.ls(jid)
expect(nrow(res) ==1, "not null return")
expect(res$status == q.status$waiting, "status of job test")
# Test job deletion
q.rm(jid)
res <- q.ls()
expect(is.null(res), "deletion check")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.