當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ts-mockito.verify函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。