-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(store): add guide for provideMockStore #1591
Conversation
Preview docs changes for 57dd876 at https://previews.ngrx.io/pr1591-57dd876/ |
|
||
<code-example header="auth.guard.spec.ts"> | ||
import { TestBed } from '@angular/core/testing'; | ||
import { provideMockActions } from '@ngrx/effects/testing'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused imports
|
||
describe('Auth Guard', () => { | ||
let guard: AuthGuard; | ||
let mockStore: MockStore<{ loggedIn: boolean } >; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The greater than/less than arrows need to be HTML entities to display correctly
@lacolaco I left some feedback. Will you move this to the top and change the title for Thanks! |
Co-Authored-By: lacolaco <suguru.inatomi@gmail.com>
Co-Authored-By: lacolaco <suguru.inatomi@gmail.com>
Co-Authored-By: lacolaco <suguru.inatomi@gmail.com>
Preview docs changes for 8df3fe7 at https://previews.ngrx.io/pr1591-8df3fe7/ |
### Providing Store for testing | ||
### Using a Mock Store | ||
|
||
The `provideMockStore()` method registers providers that allow you to mock out the `Store` for testing functionality that has a dependency on `Store` without setting up reducers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not a method
but just function
. isn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, function
is better.
Preview docs changes for ceb3ddd at https://previews.ngrx.io/pr1591-ceb3ddd/ |
1 similar comment
Preview docs changes for ceb3ddd at https://previews.ngrx.io/pr1591-ceb3ddd/ |
Preview docs changes for 240aa1d at https://previews.ngrx.io/pr1591-240aa1d/ |
1 similar comment
Preview docs changes for 240aa1d at https://previews.ngrx.io/pr1591-240aa1d/ |
Preview docs changes for 3224212 at https://previews.ngrx.io/pr1591-3224212/ |
@brandonroberts sorry for noisy commits! it's done! |
@brandonroberts |
@swapnil0545 It needs to be deployed, which I'll do today. You can also see what's latest on master if you go to https://next.ngrx.io |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
There is no guide for
provideMockStore
API.What is the new behavior?
Added
Does this PR introduce a breaking change?
Other information
maybe relates to #1383