Skip to content

[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

Merged

Conversation

ilyamore88
Copy link
Member

In this request I've added tests for our state manager.

Base automatically changed from feature/state-manager to feature/collaborative-editing May 5, 2022 11:26
ilyamore88 added 2 commits May 6, 2022 18:35
…/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 => ({
Copy link
Member

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 {
    // ...
  }
}

Copy link
Member

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.

@ilyamore88 ilyamore88 merged commit 096517b into feature/collaborative-editing May 15, 2022
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

Successfully merging this pull request may close these issues.

4 participants