当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript jasmine-marbles.hot函数代码示例

本文整理汇总了TypeScript中jasmine-marbles.hot函数的典型用法代码示例。如果您正苦于以下问题:TypeScript hot函数的具体用法?TypeScript hot怎么用?TypeScript hot使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hot函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it('ExportReport should dispatch a download action', () => {
      const type = 'csv';

      actions = hot('a', { a: new Actions.ExportReport(type) });

      const expected = hot('c', {
        c: new Actions.DownloadExportedReport(
          `api/report/${reportId}/download_file/${type}/`
        ),
      });
      expect(effects.exportReport$).toBeObservable(expected);
    });
开发者ID:burke-software,项目名称:django-report-builder,代码行数:12,代码来源:reports.spec.ts

示例2: it

        it('should return a new SearchCandidatesAction with the valid CandidateSearchFilter payload', () => {
            const action = createRouterNavigationAction('/candidate-search', { 'searchFilter': testFilter });

            actions$ = hot('-a', { a: action });

            const searchCandidatesAction = new SearchCandidatesAction({
                skills: [],
                languageSkills: [
                    { code: 'de', written: 1, spoken: 1 }
                ],
                workload: [30, 100],
                occupations: null,
                graduation: null,
                residence: ['AG', 'AI', 'GE'],
                experience: null,
                workplace: [{
                    type: 'locality',
                    code: 'ZH:ZH08',
                    label: 'Berg am Irchel',
                    order: 0
                }] as Array<TypeaheadMultiselectModel>,
                availability: null,
                workForm: null,
                degree: null,
                drivingLicenceCategory: null
            });
            const expected = cold('-b', { b: searchCandidatesAction });
            expect(effects.routerNavigation$).toBeObservable(expected);
        });
开发者ID:alv-ch,项目名称:job-room,代码行数:29,代码来源:router.effects.spec.ts

示例3: it

        it('should return new JobListLoadedAction if store is in initial state', () => {
            const jobList = [
                {
                    id: '0',
                    externalId: 'extId0',
                    title: 'title-0',
                    source: 'api',
                    publicationEndDate: new Date()
                }
            ];
            const responseWrapper = new ResponseWrapper(new Headers({ 'X-Total-Count': '100' }), jobList, 200);

            actions$ = hot('-a', { a: action });
            const response = cold('-a|', { a: responseWrapper });
            mockJobService.search.and.returnValue(response);

            const jobListLoadedAction = new actions.JobListLoadedAction({
                jobList,
                totalCount: 100,
                page: 0
            });
            const expected = cold('--b|', { b: jobListLoadedAction });

            expect(effects.initJobSearch$).toBeObservable(expected);
        });
开发者ID:alv-ch,项目名称:job-room,代码行数:25,代码来源:job-search.effects.spec.ts

示例4: it

        it('should return a new JobPublicationLoadedAction with the loaded job publication on success', () => {
            const id = 'id';
            const accessToken = 'access-token';
            const action = new LoadJobPublicationAction({ id, accessToken });

            actions$ = hot('-a', { a: action });

            const jobPublication = {
                id,
                idAvam: 'id-avam',
                accessToken,
                job: null,
                company: null,
                contact: null,
                application: null,
                publication: null,
                creationDate: 'aa',
                locale: Locale.DE,
                status: Status.INITIAL
            };
            const response = cold('-a|', { a: jobPublication });
            mockJobPublicationService.findByIdAndAccessToken.and.returnValue(response);

            const jobPublicationLoadedAction = new JobPublicationLoadedAction(jobPublication);
            const expected = cold('--b', { b: jobPublicationLoadedAction });

            expect(effects.loadJobPublication$).toBeObservable(expected);
        });
开发者ID:alv-ch,项目名称:job-room,代码行数:28,代码来源:job-publication-detail.effects.spec.ts

示例5: it

  it('should dispatch LoadPaiAfterNewFilterSuccessAction when ChangeLayerOfFilterAction dispatched', () => {
    const response = {
      name: 'base',
      children: [{
        name: 'שקל חדש',
        size: 761528.092,
      }, {
        name: 'אירו',
        size: 18448.151,
      }, {
        name: 'יין יפני',
        size: 2792.143,
      }, {
        name: 'לירה שטרלינג',
        size: 3424.247,
      }, {
        name: 'דולר אמריקאי',
        size: 374767.135,
      }],
    };

    actions = hot('--a-', { a: new ChangeLayerOfFilterAction() });
    const expected = cold('--b', {b: new LoadPaiAfterNewFilterSuccessAction(response)});
    const service = createServiceStub(response);
    const effectsAction = new PaiEffect(new Actions(actions), service);

    expect(effectsAction.changeFilterLayer$).toBeObservable(expected);
  });
开发者ID:hasadna,项目名称:open_pension,代码行数:28,代码来源:pai.effect.spec.ts

示例6: it

        it('should not return anything if state.occupation is falsy', () => {
            const action = new LanguageChangedAction('de');

            actions$ = hot('-a---', { a: action });

            const expected = cold('-');
            expect(effects.languageChange$).toBeObservable(expected);
        });
开发者ID:alv-ch,项目名称:job-room,代码行数:8,代码来源:candidate-search.effects.spec.ts

示例7: it

    it(`should not do anything if the query is an empty string`, () => {
      const action = new Search('');

      actions$.stream = hot('-a---', { a: action });
      const expected = cold('---');

      expect(effects.search$).toBeObservable(expected);
    });
开发者ID:AlexChar,项目名称:platform,代码行数:8,代码来源:book.effects.spec.ts


注:本文中的jasmine-marbles.hot函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。