describe:是用來將一至多組有相關的測試組合在一起的區塊。
text()& html()內容物
mount:掛載。
data-test:在html綁定。
find():使用 Document.querySelector() 的語法,find() 沒有找到目標元素時不會拋出錯誤。
text()text內容物。
html()html內容物。
案例 text()& html()內容物 單元測試
1 | //html |
單元測試
1 | //引入描述、它、期望 |