editor-js / editor-js/document-model

Add integration tests for EditorDocument class

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12
Forks
3
PR merge metrics
No merged PRs in 30d

Description

By integration tests we need to check that all calls are being propagated into child entities through the whole model

All checks should be done by assertion on `serialized` method of EditorDocument

| Method | Comment |
| --- | --- |
| constructor | check that the whole model is initialized with data passed to constructor |
| addBlock | check that block is created and initialized with data passed to the method |
| updateValue | check that value of related ValueNode is updated |
| updateTuneData | check if related BlockTune value is updated |
| insertText | check that related TextNode value is updated |
| removeText | check that related TextNode value is updated |
| format | check that related TextNode value is updated |
| unformat | check that related TextNode value is updated |

Final test case should assert on "real-life" scenario like adding/removing some blocks and updating their nodes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.