-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature] Add tests of state manager #2023
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
[Feature] Add tests of state manager #2023
Conversation
…js into feature/tests-of-state-manager � Conflicts: � src/components/store/createStore.ts � src/components/store/demo.ts
…/editor.js into feature/tests-of-state-manager � Conflicts: � src/components/store/createStore.ts � src/components/store/demo.ts � src/components/store/index.ts � types/store/reducer.ts � types/store/store.ts
* | ||
* @param block - new block data | ||
*/ | ||
export const createBlock = (block: OutputBlockData): CreateBlockAction => ({ |
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.
why anonymous function? Its better to create regular named function:
function createBlock(block: OutputBlockData): CreateBlockAction {
return {
// ...
}
}
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.
and probably it would better to name it makeCreateBlockAction
because that is what this function does.
In this request I've added tests for our state manager.