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


TypeScript ModelHelper.generateMap函數代碼示例

本文整理匯總了TypeScript中base/shared/ModelHelper.generateMap函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript generateMap函數的具體用法?TypeScript generateMap怎麽用?TypeScript generateMap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了generateMap函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('getStations should be a stations observable and having a Map Immutable response', done => {
   const MockStationMap = generateMap(MockStations.list, StationModel);
   service.getStations()
   .subscribe(result => {
     expect(result).to.deep.equal(MockStationMap);
     done();
   });
 });
開發者ID:atSistemas,項目名稱:angular-base,代碼行數:8,代碼來源:weather-map.service.spec.ts

示例2: it

      it('should display 2 forecasts detail components', async () => {
        const mockForecasts = [{}, {}];
        component.forecasts = generateMap(mockForecasts, ForecastModel).valueSeq();

        fixture.detectChanges();

        await fixture.whenStable();

        const details = de.queryAll(By.css('weather-forecast-detail'));

        expect(details).to.have.lengthOf(2);
      });
開發者ID:atSistemas,項目名稱:angular-base,代碼行數:12,代碼來源:forecast.component.spec.ts

示例3: it

 it('should handle forecasts success', () => {
   const response = generateMap(MockForecasts.list, ForecastModel);
   const action: Action = {
     type: ActionTypes.FORECASTS_SUCCESS,
     payload: { response }
   };
   const expectedState = new WeatherModel({
     forecasts: response
   });
   expect(WeatherReducer(undefined, action).toObject()).to.deep.equal(expectedState.toObject());
   expect(WeatherReducer(state, action).toObject()).to.deep.equal(expectedState.toObject());
 });
開發者ID:atSistemas,項目名稱:angular-base,代碼行數:12,代碼來源:weather.reducers.spec.ts

示例4: beforeEach

    beforeEach(() => {
      TestBed.configureTestingModule({
        declarations: [
          MapComponent,
          StationMarkerComponent,
          StationInfoComponent,
          HumidityPipe, PressurePipe, TemperaturePipe],
        imports: [
          GoogleMapsModule
        ],
      }).compileComponents();

      fixture = TestBed.createComponent(MapComponent);
      component = fixture.componentInstance;
      de = fixture.debugElement;
      el = fixture.nativeElement;

      component.stations = generateMap([{}, {}], StationModel).toIndexedSeq();

      fixture.detectChanges();
    });
開發者ID:atSistemas,項目名稱:angular-base,代碼行數:21,代碼來源:map.component.spec.ts

示例5: generateMap

 .map(forecasts => generateMap(forecasts.list, ForecastModel));
開發者ID:atSistemas,項目名稱:angular-base,代碼行數:1,代碼來源:weather-map.service.ts


注:本文中的base/shared/ModelHelper.generateMap函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。