add test for joi