• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kommitters / editorjs-toggle-block / 10890014839

16 Sep 2024 06:40PM UTC coverage: 30.939% (-1.2%) from 32.139%
10890014839

Pull #242

github

web-flow
Merge 27130c353 into 152a5cd00
Pull Request #242: General decoupling in functions

73 of 367 branches covered (19.89%)

Branch coverage included in aggregate %.

77 of 456 new or added lines in 24 files covered. (16.89%)

4 existing lines in 1 file now uncovered.

250 of 677 relevant lines covered (36.93%)

29.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/nest/setNestedBlockAttributes.js
1
/**
2
   * Sets the required attributes to convert an external block
3
   * of the toggle into a block inside the toggle.
4
   */
5
export default function setNestedBlockAttributes() {
NEW
6
  const blockIndex = this.api.blocks.getCurrentBlockIndex();
×
NEW
7
  const block = this.api.blocks.getBlockByIndex(blockIndex);
×
NEW
8
  const { holder } = block;
×
NEW
9
  const willBeABlock = holder.getAttribute('will-be-a-nested-block');
×
10

NEW
11
  if (willBeABlock) {
×
NEW
12
    holder.removeAttribute('will-be-a-nested-block');
×
NEW
13
    this.setAttributesToNewBlock(blockIndex);
×
NEW
14
    this.api.toolbar.close();
×
15
  }
16
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc