tests/testthat/test-vector-append.r

# APPEND
# ----------

library(magrittr)
source("utils.r")

context('vector append')

test_that('vector-append', {
  x. <- 1:5 %>% sticky
  x. %>% expect_is('sticky')
  x. <- x. %>% set_foo
  x. <- x. %>% append(1:3)
  x. %>% expect_is('sticky')
  x. %>% attr('foo') %>% expect_equal('bar')
})

Try the sticky package in your browser

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

sticky documentation built on April 14, 2020, 6:34 p.m.