Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个要测试的组件(不是模拟)。它有一些公共和私人领域,比如destroy$ = new Subject();没有@Input. 当我调用 MockRender 并通过 获取组件时fixture.point.componentinstance,字段未定义。构造函数内的控制台日志也不会被触发。那么 MockRender 是做什么的呢?为什么它没有以正确的方式实例化组件类?还是我以错误的方式使用库?这是预期的行为吗?
destroy$ = new Subject();
@Input
fixture.point.componentinstance