library(jutebag)
context("JSON utils")
# ============================================================================ #
# Tests
# ============================================================================ #
# ---------------------------------------------------------------------------- #
test_that("compact_json_str works as expected", {
txt <- paste("{\n \"sig_lev\": [0.05],\n \"sidedness\":",
"[\"two\"],\n \"n_sims\": [1000]\n }")
ex <- "{\"sig_lev\":[0.05],\"sidedness\":[\"two\"],\"n_sims\":[1000]}"
expect_equal(compact_json_str(txt), ex)
})
# ---------------------------------------------------------------------------- #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.