【发布时间】:2017-12-21 21:54:34
【问题描述】:
到目前为止,我阅读的大多数问题仅涉及在运行 Protractor/vscode 时尝试调试单元测试/e2e 测试(或者更确切地说,如何使断点在 vscode 中工作)
就我而言,我可以在我的 e2e 测试中放置断点,并且 vscode 没有问题,但是问题是,一旦我进入it() 函数,我就有了不知道如何访问/检查我的组件
我知道 e2e 测试与组件无关,但在这种情况下,我能够找到一个只有 e2e 测试才能捕获的讨厌的错误,我真的需要检查组件变量以了解发生了什么
it('should do something with ProductComponent', () =>
{
// Code...
// Once I'm here, how can I inspect ProductComponent anyway??
}
例如,ProductComponent 如下所示:
@Component({
selector : 'app-product',
templateUrl: './product.component.html',
styleUrls : ['./product.component.css']
})
export class ProductComponent
{
productId: number;
productSKU: number;
// ...
}
【问题讨论】:
标签: angular protractor visual-studio-code