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


TypeScript testing.provideMockActions函數代碼示例

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


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

示例1: beforeEach

		beforeEach(() => {
			TestBed.configureTestingModule({
				providers: [PodcastsEffects, provideMockActions(() => actions), { provide: PodcastService, useValue: podcastService }]
			}).compileComponents();

			effects = TestBed.get(PodcastsEffects);
		});
開發者ID:davinkevin,項目名稱:Podcast-Server,代碼行數:7,代碼來源:podcasts.component.spec.ts

示例2: beforeEach

    beforeEach(() => {
      TestBed.configureTestingModule({
        providers: [SearchEffects, provideMockActions(() => actions), { provide: ItemService, useValue: itemService }]
      });

      effects = TestBed.get(SearchEffects);
    });
開發者ID:davinkevin,項目名稱:Podcast-Server,代碼行數:7,代碼來源:search.component.spec.ts

示例3: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        AuthEffects,
        {
          provide: AuthService,
          useValue: { login: jest.fn() },
        },
        provideMockActions(() => actions$),
        {
          provide: Router,
          useValue: { navigate: jest.fn() },
        },
        {
          provide: MatDialog,
          useValue: {
            open: jest.fn(),
          },
        },
      ],
    });

    effects = TestBed.get(AuthEffects);
    authService = TestBed.get(AuthService);
    actions$ = TestBed.get(Actions);
    routerService = TestBed.get(Router);
    dialog = TestBed.get(MatDialog);

    spyOn(routerService, 'navigate').and.callThrough();
  });
開發者ID:sonicdelay,項目名稱:mtcms,代碼行數:30,代碼來源:auth.effects.spec.ts

示例4: beforeAll

    beforeAll(() => {
        actions = new ReplaySubject<Action>(1);
        noteEditor = jasmine.createSpyObj('editor', [
            'loadNoteContent',
            'saveNote',
        ]);
        listManager = jasmine.createSpyObj('listManager', [
            'resizeSnippets',
        ]);

        TestBed
            .configureTestingModule({
                imports: [
                    StoreModule.forRoot({
                        note: combineReducers(noteReducerMap),
                    }),
                ],
                providers: [
                    { provide: NoteEditorService, useValue: noteEditor },
                    { provide: NoteSnippetListManager, useValue: listManager },
                    NoteContentEffects,
                    provideMockActions(() => actions),
                ],
            });
    });
開發者ID:suiruiw,項目名稱:geeks-diary,代碼行數:25,代碼來源:note-content.effects.spec.ts

示例5: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        LoginEffects,
        provideMockActions(() => actions$)
      ]
    });

    effects = TestBed.get(LoginEffects);
  });
開發者ID:dgdavidgreene,項目名稱:AngularProjectBase,代碼行數:10,代碼來源:login.effects.spec.ts

示例6: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        { provide: FiltersService, useValue: filtersServiceStub },
        FiltersEffect,
        provideMockActions(() => actions),
      ],
    });

    effects = TestBed.get(FiltersEffect);
  });
開發者ID:hasadna,項目名稱:open_pension,代碼行數:11,代碼來源:filters.effect.spec.ts

示例7: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        VatsimEffects,
        provideMockActions(() => actions),
        { provide: VatsimService, useClass: VatsimServiceStub },
      ]
    });

    effects = TestBed.get(VatsimEffects);
  });
開發者ID:Vatsinator,項目名稱:Vatsinator,代碼行數:11,代碼來源:vatsim.effects.spec.ts

示例8: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        { provide: PostService, useValue: postServiceStub },
        PostEffect,
        provideMockActions(() => actions),
      ],
    });

    effects = TestBed.get(PostEffect);
  });
開發者ID:hasadna,項目名稱:open_pension,代碼行數:11,代碼來源:post.effect.spec.ts

示例9: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        { provide: QuartersService, useValue: quartersServiceStub },
        { provide: PaiService, useValue: paiServiceStub },
        QuartersEffect,
        provideMockActions(() => actions),
      ],
    });

    effects = TestBed.get(QuartersEffect);
  });
開發者ID:hasadna,項目名稱:open_pension,代碼行數:12,代碼來源:quarters.effect.spec.ts

示例10: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        MtcmsEffects,
        provideMockActions(() => {
          console.log(actions$);
          return actions$;
        })
      ]
    });

    effects = TestBed.get(MtcmsEffects);
  });
開發者ID:sonicdelay,項目名稱:mtcms,代碼行數:13,代碼來源:mtcms.effects.spec.ts


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