當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。