Skip to content

Instantly share code, notes, and snippets.

@thecodinganalyst
Created June 16, 2022 14:01
Show Gist options
  • Save thecodinganalyst/f86d2fdcead91b218fea058dfb082b00 to your computer and use it in GitHub Desktop.
Save thecodinganalyst/f86d2fdcead91b218fea058dfb082b00 to your computer and use it in GitHub Desktop.
Angular NgRx Effects TestBed ConfigureTestingModule
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
BooksEffects,
provideMockActions(() => actions$),
provideMockStore({initialState}),
],
imports: [HttpClientModule]
})
booksService = TestBed.inject(BooksService)
effects = TestBed.inject(BooksEffects)
store = TestBed.inject(Store)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment