• 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

78.26
/src/utils.js
1
const camelToDashMap = new Map();
2✔
2
export function camelToDash(str) {
3
  let result = camelToDashMap.get(str);
140✔
4
  if (result === undefined) {
140✔
5
    result = str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
6✔
6
    camelToDashMap.set(str, result);
6✔
7
  }
8
  return result;
140✔
9
}
10

11
export function dispatch(host, eventType, options = {}) {
×
UNCOV
12
  return host.dispatchEvent(
×
13
    new globalThis.CustomEvent(eventType, { bubbles: false, ...options }),
14
  );
15
}
16

17
export function stringifyElement(target) {
UNCOV
18
  return `<${String(target.tagName).toLowerCase()}>`;
×
19
}
20

21
export function walkInShadow(target, cb) {
22
  if (target.nodeType === globalThis.Node.ELEMENT_NODE) {
33!
23
    cb(target);
33✔
24

25
    if (target.shadowRoot) {
33!
UNCOV
26
      walkInShadow(target.shadowRoot, cb);
×
27
    }
28
  }
29

30
  const walker = globalThis.document.createTreeWalker(
33✔
31
    target,
32
    globalThis.NodeFilter.SHOW_ELEMENT,
33
    null,
34
    false,
35
  );
36

37
  while (walker.nextNode()) {
33✔
38
    const el = walker.currentNode;
1,658✔
39
    cb(el);
1,658✔
40
    if (el.shadowRoot) {
1,658!
UNCOV
41
      walkInShadow(el.shadowRoot, cb);
×
42
    }
43
  }
44
}
45

46
let debugMode = false;
2✔
47
export function isDebugMode() {
48
  return debugMode;
52✔
49
}
50

51
export function debug() {
UNCOV
52
  debugMode = true;
×
53
}
54

55
export const deferred = Promise.resolve();
2✔
56
export const storePointer = new WeakMap();
2✔
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