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

feat: add performCount to derived state #88

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

paoloricciuti
Copy link
Collaborator

Closes #87

This also kinda setup the testing for the derived state (which i think we should test separately for each field and following this pattern of adding the expected values in the each)...let me know what you think about it.

Copy link
Collaborator

@beerinho beerinho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is exporting the tasks from the tests/components/... folder setting it up for something else? If not we probably don't need the exports.

Out of curiosity, do you usually prefer to use an object perform_count : {expected} over a string/number expected_perform_count?

@paoloricciuti
Copy link
Collaborator Author

Is exporting the tasks from the tests/components/... folder setting it up for something else? If not we probably don't need the exports.

Those exports are imported in the test after the render so that we can check what's inside the store.

Out of curiosity, do you usually prefer to use an object perform_count : {expected} over a string/number expected_perform_count?

I just did that because for other derived state we might need more values so it's not everything inside the single object but we can organize the values in terms of the derived state they refer to. But we can change that.

@beerinho
Copy link
Collaborator

beerinho commented May 24, 2024

Is exporting the tasks from the tests/components/... folder setting it up for something else? If not we probably don't need the exports.

Those exports are imported in the test after the render so that we can check what's inside the store.

Ah yeah, so they are

I just did that because for other derived state we might need more values so it's not everything inside the single object but we can organize the values in terms of the derived state they refer to. But we can change that.

I see, I guess a single object with all derived state might make more sense:

expected_state: {
  perform_count: 5	  
}

But we can change that if needed later on

@paoloricciuti paoloricciuti added the enhancement New feature or request label May 24, 2024
@paoloricciuti paoloricciuti merged commit 228e0a9 into main May 24, 2024
3 checks passed
@paoloricciuti paoloricciuti deleted the add-perform-count branch May 24, 2024 15:25
@github-actions github-actions bot mentioned this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add performCount
2 participants