[英]why module in not found in angular “TestBed”?
你能告诉我为什么为什么在angular中找不到模块吗? 这是我的代码https://codesandbox.io/s/8k7vlvl5q2
问题在这条线上
<<import { ComponentFixture, async, TestBed } from "@angular/testing";
>>
TestBed
没有名为@angular/testing
模块。
您必须从@angular/core/testing
导入TestBed
。
将您的导入行更改为
import { ComponentFixture, async, TestBed } from "@angular/core/testing";
另外,请确保正确安装@angular/core
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.