本文整理汇总了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);
});
示例2: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [SearchEffects, provideMockActions(() => actions), { provide: ItemService, useValue: itemService }]
});
effects = TestBed.get(SearchEffects);
});
示例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();
});
示例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),
],
});
});
示例5: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
LoginEffects,
provideMockActions(() => actions$)
]
});
effects = TestBed.get(LoginEffects);
});
示例6: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
{ provide: FiltersService, useValue: filtersServiceStub },
FiltersEffect,
provideMockActions(() => actions),
],
});
effects = TestBed.get(FiltersEffect);
});
示例7: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
VatsimEffects,
provideMockActions(() => actions),
{ provide: VatsimService, useClass: VatsimServiceStub },
]
});
effects = TestBed.get(VatsimEffects);
});
示例8: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
{ provide: PostService, useValue: postServiceStub },
PostEffect,
provideMockActions(() => actions),
],
});
effects = TestBed.get(PostEffect);
});
示例9: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
{ provide: QuartersService, useValue: quartersServiceStub },
{ provide: PaiService, useValue: paiServiceStub },
QuartersEffect,
provideMockActions(() => actions),
],
});
effects = TestBed.get(QuartersEffect);
});
示例10: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
MtcmsEffects,
provideMockActions(() => {
console.log(actions$);
return actions$;
})
]
});
effects = TestBed.get(MtcmsEffects);
});