describe("WS()", { it("can estimate the stem weight.", { expect_equal(WS(20, 7), 57.85323) }) it("return `NA` when the diameter or height inputed is NA.", { expect_equal(WS(NA, 10), NA) expect_equal(WS(10, NA), NA) expect_equal(WS(NA, NA), NA) }) it("return `0` when the diameter or height inputed is 0.", { expect_equal(WS(0, 10), 0) expect_equal(WS(10, 0), 0) expect_equal(WS(0, 0), 0) }) })