我有两个规格文件,test1.spec.ts
和test2.spec.ts
。
两者都使用TestBed.configureTestingModule()
。
当我运行ng test
时,只有第一个文件通过了所有测试,并且出现错误:
Failed: cannot configure the test module when the test module has already been instantiated.
。
当我删除其中一个文件时,其余文件通过了所有测试。
如有需要,我可以提供更多详细信息。