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

RootInlineNode #12

Merged
merged 9 commits into from
Aug 29, 2023
Merged

RootInlineNode #12

merged 9 commits into from
Aug 29, 2023

Conversation

gohabereg
Copy link
Member

@gohabereg gohabereg commented Aug 24, 2023

PR adds:

  • RootInlineNode as single point access to inline fragment tree
  • Updates directory structure
  • Add tree normalization on input and output
  • Inline fragments tree integration tests (done, but all tests require refactoring)

@github-actions
Copy link

github-actions bot commented Aug 24, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
99.22% (-0.1% 🔻)
382/385
🟢 Branches
95.92% (-1.34% 🔻)
94/98
🟢 Functions
98.1% (-0.71% 🔻)
103/105
🟢 Lines
99.17% (-0.1% 🔻)
358/361
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.ts
98.7% 100% 95% 98.67%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.ts
98.15% 88.89% 100% 98.08%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.ts
98.39% 95.65% 100% 98.33%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / InlineToolName.ts
100% 100% 100% 100%
🟢
... / InlineToolData.ts
100% 100% 100% 100%
🟢
... / TextInlineNode.mock.ts
100% 100% 100% 100%

Test suite run success

140 tests passing in 10 suites.

Report generated by 🧪jest coverage report action from e194c67

@gohabereg gohabereg changed the base branch from main to feature/formatting-node-unformat August 24, 2023 00:43
Base automatically changed from feature/formatting-node-unformat to main August 24, 2023 00:44
@gohabereg gohabereg marked this pull request as ready for review August 24, 2023 22:37
src/entities/inline-fragments/FormattingNode/index.ts Outdated Show resolved Hide resolved
src/entities/inline-fragments/InlineNode/index.ts Outdated Show resolved Hide resolved
src/entities/inline-fragments/FormattingNode/index.ts Outdated Show resolved Hide resolved
src/entities/inline-fragments/FormattingNode/index.ts Outdated Show resolved Hide resolved
src/entities/inline-fragments/FormattingNode/index.ts Outdated Show resolved Hide resolved
src/entities/inline-fragments/specs/FormattingNode.spec.ts Outdated Show resolved Hide resolved
const index = 100;

expect(() => tree.removeText(index))
.toThrowError();
Copy link
Contributor

Choose a reason for hiding this comment

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

could we also check the error text or type here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a good idea to check for error text as we might change it later. We can use custom error classes, but that's a whole big task

Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the error text, we can also change it in tests. For now any error thrown during execution of removeText() will lead false-positive test assertion

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: Ilya Maroz <37909603+ilyamore88@users.noreply.github.com>
@gohabereg gohabereg merged commit 76035db into main Aug 29, 2023
5 checks passed
@gohabereg gohabereg deleted the feature/root-inline-node branch August 29, 2023 20:56
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.

3 participants