test_that("magnitude works for vector input", { expect_equal(magnitude(c(1, 1)), sqrt(2)) })