腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
搜索
关闭
文章
问答
(3989)
视频
开发者手册
清单
用户
专栏
沙龙
全部问答
原创问答
Stack Exchange问答
更多筛选
回答情况:
全部
有回答
回答已采纳
提问时间:
不限
一周内
一月内
三月内
一年内
问题标签:
未找到与 相关的标签
筛选
重置
1
回答
TestBed
模拟服务
DocumentEditComponent; ], }); fixture =
TestBed
.createComponent
浏览 0
提问于2018-08-15
得票数 2
回答已采纳
1
回答
角
TestBed
.inject
TestBed
.inject(服务)是否创建服务的新实例?我总是假设
TestBed
.configureTestingModule()创建了服务,通过注入,我们只访问了创建的服务的引用。
浏览 3
提问于2021-06-03
得票数 0
回答已采纳
1
回答
Angular 4
TestBed
compileComponents
/gen-test.component.css' ],export class GenTestComponent { 测试很简单,如下所示
TestBed
.configureTestingModule/~/@ang
浏览 6
修改于2017-11-02
得票数 0
2
回答
使用
TestBed
的OverrideComponent
如何使用
TestBed
(在Angular 2 RC5中)做到这一点?在我使用overrideDirective(MainComponentName, ChildComponentA, MockChildComponentA);之前,有没有使用
TestBed
的等价物 set: { template: '<div></div>'
浏览 0
修改于2018-07-16
得票数 6
回答已采纳
2
回答
为
TestBed
提供"entryComponents“
TestBed
declarations: [MyAwesomeDynamicComponentRenderer, TestHostComponent如何向
TestBed
提供entryComponents
浏览 0
修改于2017-01-05
得票数 53
1
回答
角
TestBed
模拟服务
测试 let store: Store;
TestBed
.configureTestingModuleproviders: [{provide: DatabaseService, useValue: {updateUserField: of(1)}}] store =
TestBed
.get
浏览 0
提问于2020-03-12
得票数 0
回答已采纳
1
回答
Angular2
TestBed
注入
因为我使用的是Angular的一个组件,所以我将使用Angular的
TestBed
类。所以我设置我的beforeEach如下:beforeEach(async(() => { ] router =
TestBed
.get但是,我现在尝试使用
TestBed
In
浏览 12
提问于2017-03-06
得票数 0
2
回答
如果以前运行过
TestBed
.OverrideProvider()或
TestBed
.get() (已弃用),则
TestBed
.inject()不能工作
给出下面的示例规范测试
TestBed
.configureTestingModule({ } }); let config =
TestBed
.overrideProvider(GLOB
浏览 6
提问于2020-05-29
得票数 0
回答已采纳
1
回答
getTestBed与
TestBed
的区别
假设我有一个测试配置,如下所示 imports: [HttpClientTestingModule],providers: [SomeService]如果我想获得注入服务,那么
TestBed
.get(SomeService
浏览 0
提问于2019-10-08
得票数 6
回答已采纳
1
回答
Unicode文件名
testbed
我有一个C++应用程序,它使用不同语言的Unicode文件名(将它们写在数据库中)。是否有一个包含不同语言(使用该语言的特定字符)的文件名的测试台,我可以用它来测试我的应用程序?
浏览 0
提问于2012-02-25
得票数 2
2
回答
为管道配置
testBed
的С
同事们,谁能告诉我,我正在尝试为管道配置
testBed
,只有当我将管道本身放入提供者中时,它才能起作用,我将对其进行测试。我无论如何也绕不开这件事,你能告诉我出什么事了吗?
浏览 11
提问于2021-06-24
得票数 0
1
回答
尝试导入
testbed
时出错
我真的很想使用他们的python
testbed
库为Google App Engine编写测试,但每次我都尝试使用我得到以下错误Projects/busybeeapp/tests/test_something.py", line 1, in <module> from google.appengine.ext import
testbed
Contents/Resources/Go
浏览 1
提问于2011-04-17
得票数 2
回答已采纳
2
回答
角9
TestBed
.inject & Provider重写
因为
TestBed
.get已在角9中被弃用 providers: [{ provide: MyClass, useClass: MyStub}]真的是这样还是有更好的办法?const obj : MyStub =
TestBed
.inject(MyClass) as unknown as MyStub;
浏览 1
提问于2020-02-18
得票数 11
回答已采纳
1
回答
角单元测试--如何在
TestBed
提供程序中使用useValue向
TestBed
注入依赖项
配置为:
TestBed
.configureTestingModule({ });}); 错误:代码本身在服务/构建时运行良好,因此我假设错误就在我如何配置
TestBed
的某个地方?我也尝试过us
浏览 0
修改于2020-11-02
得票数 0
回答已采纳
1
回答
atom不识别angular 2
TestBed
条目
Atom编辑不能识别Angular 2Jasmine
TestBed
的关键字(如describe,expect,it,beforeEach),即使我已经安装了我能找到的所有相关的atom片段(使用apm
浏览 0
修改于2017-01-18
得票数 0
1
回答
无法使用TypeScript和包运行
Testbed
。错误: planck.
testbed
不是一个函数
是否可以在包中使用
Testbed
?我在Sandbox上的TypeScript中做了一个简单的例子:,我有一个错误:planck.
testbed
is not a function{ const world = planck.World();
浏览 9
修改于2022-08-14
得票数 0
回答已采纳
9
回答
角4单位试验(
TestBed
)极慢
我有一些单元测试使用角
TestBed
。即使测试非常简单,它们的运行速度也非常慢(平均每秒运行1次测试)。import { Component } from "@angular/core"; import { ComponentFixture,
TestBed
, async } from{ key: "key_3", value: "value_3&
浏览 16
修改于2017-12-07
得票数 28
回答已采纳
2
回答
带模拟的Angular 2
TestBed
相反,我必须使用
TestBed
。当我出于某种原因提供mock angular时,请继续寻找mock所依赖的服务。并抛出一个DI exception。mocks myMockWindow = <any> {location: <any> {hostname: '127.0.0.1'}}; ],
浏览 15
提问于2016-08-12
得票数 7
1
回答
在ngOnInit中创建角分量时,如何在
TestBed
中重写
TestBed
中的函数?
this.initializeData();在每个函数之前,我尝试了以下实现,但是这样ngOninit将执行两次: testHostFixture =
TestBed
.createComponent
浏览 2
提问于2020-01-14
得票数 1
回答已采纳
1
回答
茉莉中的
TestBed
是什么?
我是刚接触Angular 2的Jasmine,在编写测试用例时,我经常使用
TestBed
对象并得到错误:Please call "
TestBed
.compileComponents" before your
浏览 0
修改于2017-06-08
得票数 4
回答已采纳
第 2 页
第 3 页
第 4 页
第 5 页
第 6 页
第 7 页
第 8 页
第 9 页
第 10 页
第 11 页
点击加载更多
领券