我目前正在使用Karma测试运行器进行我的Angular项目,使用茉莉花测试框架.它工作得很好,但我有一个问题:当一个对象比较失败时,生成的打印到控制台真的很难读,并且这些对象拥有的属性越来越难.例:
Expected spy spy to have been called with [ { currentCareMoment : { ID : 5, Description : 'Late namiddag (16-20)', StartHour : 16, EndHour : 20 }, previousCareMoment : { ID : 4, Description : 'Namiddag (14-16)', StartHour : 14, EndHour : 16 } } ] but actual calls were [ { currentCareMoment : { ID : 6, Description : 'Avond (20-24)', StartHour : 20, EndHour : 24 }, previousCareMoment : { ID : 5, Description : 'Late …Run Code Online (Sandbox Code Playgroud)