tests/testthat/test-collapse.R

testthat::context('fold')

testthat::describe('fold methods',{
  
  it('close',{
    testthat::expect_equal(
      foldend(),
      "\\if{html}{\\out{</details>}}"
    )    
  })
  
  it('open default',{
    testthat::expect_equal(
      foldstart(),
      "\\if{html}{\\out{<br><details>}}"
    )
  })
  
  it('open with summary',{
    testthat::expect_equal(
      foldstart(title = 'test'),
      "\\if{html}{\\out{<br><details><summary> <span title='Click to Expand'> test </span> </summary>}}"
    )
  })
  
})

Try the details package in your browser

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

details documentation built on March 28, 2022, 1:06 a.m.