tests/testthat/test-key.R

context("key handling")

test_that("The key in funnel is dependent on order", {
  expect_true(
    !identical(
      funnel("foo", "bar") %>% get_key,
      funnel("bar", "foo") %>% get_key
    )
  ) 
})

test_that("Key is dependent on the path", {
  expect_true(
    all(
      (2 %>>% prod(3) %>>% prod(2) %>% get_key)[[3]] !=
      (2 %>>% prod(2) %>>% prod(3) %>% get_key)[[3]]
    )
  )
})

Try the rmonad package in your browser

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

rmonad documentation built on March 26, 2020, 7:31 p.m.