Skip to content
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

Should line 24 of src/__tests__/task-12_state.js say the component should only change with "new" state? #37

Closed
hamirmahal opened this issue Jan 14, 2021 · 3 comments

Comments

@hamirmahal
Copy link
Contributor

Line 24 of src/__tests__/task-12_state.js says test('Check Component only changes given state', () => {, but should it say test('Check Component only changes given new state', () => {, instead, since Component should only change when it receives new state?

@hamirmahal
Copy link
Contributor Author

If so, I can submit a pull request for this.

@sveinpg
Copy link
Owner

sveinpg commented Jan 14, 2021

Hi!

I can see why you find this confusing. The test actually checks if key-value pairs are preserved when another part of the state is updated

@sveinpg sveinpg closed this as completed Jan 20, 2021
@hamirmahal
Copy link
Contributor Author

Sorry I didn't respond to this earlier. I think aa426cc fixes this by having src/__tests__/task-12_state.js say test('Check if key-value pairs are preserved when another part of the state is updatede', () => {.

Thanks for updating it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants