{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceRoot}"
],
"ns.customSetting": "customValue"
},
{
"name": "Extension with another value",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceRoot}"
],
"ns.customSetting": "anotherValue"
}
]
}
ReferenceError:未定义spyOnProperty错误正在运行测试用例。
我要监视服务中存在的治疗指令行为主体,如下所述:
it('should update treatment instruction data in UI', async(() => {
const spy = spyOnProperty(appService.treatmentInstruction, 'next',
'get').and.returnValue(treatmentInst);
component.updateTemplateInUI();
fixture.whenStable().then(() => {
expect(component.structuresInfo.length).toBe(2);
expect(component.oarStructureLength).toBe(4);
expect(component.notesArray.length).toBe(2);
});
}));
答案 0 :(得分:0)
spyOnProperty
是在茉莉2.6.0上添加的,请确保您满足该要求。
由于jasmine
是karma-jasmine
的依赖项,因此更新了它。看起来好像是在该库的旧版本上将jasmine
作为peer dependency添加的一样,因此您可以自行安装正确版本的jasmine
。
答案 1 :(得分:0)
按照“ @ types / jasmine”:“〜2.8.3”,“ jasmine-core”:“〜2.8.0”,