我的服务对象是这样的:varappService={serviceOne:{get:function(){}},serviceTwo:{query:function(){}}}我想模拟appService,像这样:expect(appService.serviceTwo.query).toHaveBeenCalled();我该怎么做? 最佳答案 好的,我得到了这个工作:appService:{serviceOne:jasmine.createSpyObj('serviceOne',['get']),serviceTwo:jasmin