How to use the @ngrx/effects/testing.provideMockActions function in @ngrx/effects

To help you get started, we’ve selected a few @ngrx/effects examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngxp / store-service / src / app / shared / books / book-store.service.spec.ts View on Github external
TestBed.configureTestingModule({
            providers: [
                BookStoreService,
                provideMockStore({
                    selectors: [
                        {
                            selector: selectBooks,
                            value: books
                        },
                        {
                            selector: selectBook,
                            value: books[0]
                        }
                    ]
                }),
                provideMockActions(mockActions)
            ]
        });
    }));
github rabix / composer / src / app / execution / services / executor-output-parser / executor-output-parser.service.spec.ts View on Github external
beforeEach(() => {

        const actionSource = new ReplaySubject();

        dispatch = (action: Action) => actionSource.next(action);

        TestBed.configureTestingModule({
            imports: [],
            providers: [
                provideMockActions(actionSource),
                ExecutorOutputParser
            ]
        });

        service = TestBed.get(ExecutorOutputParser);
    });