本文整理匯總了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);
});