should handle toString -The toString method should return the correct hierarchy (no reply)

前端 未结 2 1388
盖世英雄少女心
盖世英雄少女心 2021-01-26 18:07

I\'m working on a test and a lot of unit(hidden) tests were given , however I ran into this error with a block of my code. Can you all please help me out?

getStr         


        
2条回答
  •  孤城傲影
    2021-01-26 18:49

    I guess your test fails because you mix template literals and string concatenation, if you take e.g.:

     `${this._message} + "by" ${authorName}`
    

    then a message will be inserted by the template:

    `Heureka! + "by" Archimedes`
    

    I guess it should rather be:

    `${this._message} by ${authorName}`
    

    Also repliedTo.authorName should be wrapped in ${...}

提交回复
热议问题