本文整理汇总了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();
});
示例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();
});
示例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))
})
示例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();
});
示例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();
});
示例6: it
it('passes options for component', () => {
uut.mergeOptions('theComponentId', { blurOnUnmount: true });
verify(
mockedNativeCommandsSender.mergeOptions(
'theComponentId',
deepEqual({ blurOnUnmount: true })
)
).called();
});