Nothing
testthat::context("Test WebSocket")
testthat::test_that("Test WebSocket server", {
ws <- websocket$new()
if (length(ws$listServers()) > 0) {
ws$stopAllServers()
}
testthat::expect_length(ws$listServers(), 0)
# test: start server
testthat::expect_message(ws$startServer())
testthat::expect_length(ws$listServers(), 1)
# test: cannot start server twice
testthat::expect_message(ws$startServer(), "existing server")
# test: stop server
testthat::expect_message(ws$stopServer())
testthat::expect_length(ws$listServers(), 0)
# test: cannot stop server twice
testthat::expect_message(ws$stopServer(), "no server")
# test sketch_mode
testthat::expect_message(ws$sketch_mode(), "No server")
ws$stopAllServers()
testthat::expect_length(ws$listServers(), 0)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.