Skip to content
Discussion options

You must be logged in to vote

先回答問題二,通常你知道背後是怎麼做的就可以自己 mock,如果本來就是用到別人的 library,那先看別人的文件裡面有沒有講怎麼做,沒有的話就只能查 issues 或是 google

問題一的話,通常你原本開發的時候 code 怎麼寫,測試的時候就會怎麼測,也就是說你本來 HPHotlistReportDetail 的參數就是 react-router 幫你放進去的,那你測試的時候就不會自己放進去(而且自己放進去也被蓋掉了,背後應該是被 context 的值蓋掉)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@s103071049
Comment options

Answer selected by s103071049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants