tests/testthat/test_sub_nums_sumit.R

#' context is the name that represents for which function we #' are doing test. Should be function name

context('sub_nums_sumit')

test_that('Subtraction of two numbers',{
	expect_identical(sub_nums_sumit(2,3),-1)
	expect_identical(sub_nums_sumit(20,10),10)
	expect_identical(sub_nums_sumit(300,200),100)

})
sumitpratap/test documentation built on May 17, 2019, 8:45 p.m.