Inflearn コミュニティ Q&A
expect(productModel.create).toBeCalled(newProduct)
作成
·
320
0
newProduct 대신에 req.body를 넣어줘도 괜찮은가요? ^^
mongoosejestexpressmongodbnodejstddsupertest
回答 4
1
0
Robert Lee
質問者
newProduct 부분을 추가해주지 않고 아래 부분만 있어도 괜찮더라고요.
expect(productModel.create).tobeCalledWith(req.body)0
0




