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

hybridsjs / hybrids / 19760852732

28 Nov 2025 10:18AM UTC coverage: 42.528% (-57.4%) from 99.915%
19760852732

Pull #296

github

web-flow
Merge 191660095 into 92ed729fc
Pull Request #296: fix(store): improve `store.record()` support & error messages while defining the model

819 of 1842 branches covered (44.46%)

9 of 9 new or added lines in 1 file covered. (100.0%)

1345 existing lines in 27 files now uncovered.

996 of 2342 relevant lines covered (42.53%)

76.9 hits per line

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

11.54
/src/template/utils.js
1
const metaMap = new WeakMap();
2✔
2
export function getMeta(key) {
UNCOV
3
  let value = metaMap.get(key);
×
UNCOV
4
  if (value) return value;
×
5

UNCOV
6
  metaMap.set(key, (value = {}));
×
UNCOV
7
  return value;
×
8
}
9

10
export function getTemplateEnd(node) {
11
  let meta;
12

UNCOV
13
  while (node && (meta = getMeta(node)) && meta.endNode) {
×
UNCOV
14
    node = meta.endNode;
×
15
  }
16

UNCOV
17
  return node;
×
18
}
19

20
export function removeTemplate(target) {
UNCOV
21
  if (target.nodeType === globalThis.Node.TEXT_NODE) {
×
UNCOV
22
    const data = metaMap.get(target);
×
23

UNCOV
24
    if (data && data.startNode) {
×
UNCOV
25
      const endNode = getTemplateEnd(data.endNode);
×
26

UNCOV
27
      let node = data.startNode;
×
UNCOV
28
      const lastNextSibling = endNode.nextSibling;
×
29

UNCOV
30
      while (node) {
×
UNCOV
31
        const nextSibling = node.nextSibling;
×
UNCOV
32
        node.parentNode.removeChild(node);
×
UNCOV
33
        node = nextSibling !== lastNextSibling && nextSibling;
×
34
      }
UNCOV
35
      metaMap.set(target, {});
×
36
    }
37
  } else {
UNCOV
38
    let child = target.childNodes[0];
×
UNCOV
39
    while (child) {
×
UNCOV
40
      target.removeChild(child);
×
UNCOV
41
      child = target.childNodes[0];
×
42
    }
43

UNCOV
44
    metaMap.set(target, {});
×
45
  }
46
}
47

48
const TIMESTAMP = Date.now();
2✔
49
export const getPlaceholder = (id = 0) => `H-${TIMESTAMP}-${id}`;
14✔
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

© 2026 Coveralls, Inc