当前位置: 首页>>代码示例>>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;未经允许,请勿转载。