angular - 尝试运行 ng test 时出错:应该创建 FAILED
问题描述
错误:无法将 @Input 装饰器与查询装饰器结合使用
我的规范文件(没有做任何更改):
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
组件文件(完全为空):
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent {
}
解决方案
推荐阅读
- flutter - Flutter, quadraticBezierTo x 和 y 是哪个?
- xslt - XSLT 内容值分组
- javascript - element.addEventListener 触发多次
- python - 熊猫如何用重复键替换行中的 NaN
- c++ - 谷物多态层次序列化深度
- firebase - 您如何使用 Firebase 分析来了解哪个用户在颤振中收到了通知
- http-live-streaming - rtmp cdn 到云流媒体或免费sreamer
- java - Jenkins 代理崩溃/终止原因:java.security.AccessControlException:
- sql - 如何将 QueryDSL 与 SINGLE_TABLE 一起使用?
- python - 尝试连接到 mongo atlas 时出现 Asn1 解析错误