本文整理汇总了TypeScript中ts-mockito.verify函数的典型用法代码示例。如果您正苦于以下问题:TypeScript verify函数的具体用法?TypeScript verify怎么用?TypeScript verify使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了verify函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should add after remove', () => {
component.draw({}, id, {});
component.remove(id);
component.draw({}, id, {});
verify(simpleDrawerService.update(anything(), anything())).never();
verify(simpleDrawerService.add(anything())).twice();
});
开发者ID:CHBaker,项目名称:angular-cesium,代码行数:7,代码来源:basic-desc.service.spec.ts
示例2: test
test('stopping the group stops the checks', () => {
const group = new HealthCheckGroup('test1');
const mockHealthCheck = mock<HealthCheck>(HealthCheck);
when(mockHealthCheck.getCheckName()).thenReturn('simpleId');
group.addCheck(instance(mockHealthCheck));
group.start();
verify(mockHealthCheck.start()).once();
group.stop();
verify(mockHealthCheck.stop()).once();
});
开发者ID:yruan,项目名称:inceptum,代码行数:10,代码来源:HealthCheck.ts
示例3: it
it('should return an OK response if all dependencies are healthy', async () => {
when(healthcheckService.isHealthy()).thenReturn(Promise.resolve(true))
await healthcheckController.healthcheck()
verify(healthcheckController.setStatus(OK))
})
开发者ID:stevenalexander,项目名称:generator-node-tsoa-api,代码行数:7,代码来源:healthcheckControllerTests.ts
示例4: it
it('calls store when button has passProps and id', () => {
const passProps = { prop: 'prop' };
const options = { topBar: { rightButtons: [{ passProps, id: '1' }] } };
uut.processOptions(options);
verify(mockedStore.setPropsForId('1', passProps)).called();
});
开发者ID:wix,项目名称:react-native-navigation,代码行数:8,代码来源:OptionsProcessor.test.ts
示例5: test
test('Readonly flag is passed (true)', async () => {
const check = new MySQLHealthCheck('testCheck', true);
const mockedMysqlClient = mock(MySQLClient);
when(mockedMysqlClient.ping(anything())).thenReturn(Promise.resolve(undefined));
check.mysqlClient = instance(mockedMysqlClient);
await check.doCheck();
verify(mockedMysqlClient.ping(true)).once();
});
开发者ID:yruan,项目名称:inceptum,代码行数:8,代码来源:MySQLHealthCheck.ts
示例6: it
it('passes options for component', () => {
uut.mergeOptions('theComponentId', { blurOnUnmount: true });
verify(
mockedNativeCommandsSender.mergeOptions(
'theComponentId',
deepEqual({ blurOnUnmount: true })
)
).called();
});
开发者ID:wix,项目名称:react-native-navigation,代码行数:9,代码来源:Commands.test.ts
注:本文中的ts-mockito.verify函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论