本文整理匯總了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();
});