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

hybridsjs / hybrids / 9387127968

05 Jun 2024 03:38PM UTC coverage: 46.684% (-53.3%) from 99.956%
9387127968

Pull #258

github

web-flow
Merge e936aa704 into 36d6e398d
Pull Request #258: feat: remove `content` property & add shadow mode detection to render property

611 of 1778 branches covered (34.36%)

69 of 97 new or added lines in 9 files covered. (71.13%)

1169 existing lines in 25 files now uncovered.

1049 of 2247 relevant lines covered (46.68%)

32.63 hits per line

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

83.33
/src/render.js
1
export default function render(desc) {
2
  if (desc.reflect) {
24!
NEW
3
    throw TypeError(`'reflect' option is not supported for 'render' property`);
×
4
  }
5

6
  const { value: fn, observe } = desc;
24✔
7

8
  if (typeof fn !== "function") {
24!
UNCOV
9
    throw TypeError(
×
10
      `Value for 'render' property must be a function: ${typeof fn}`,
11
    );
12
  }
13

14
  const rest = {
24✔
15
    connect: desc.connect,
16
    observe: observe
24✔
17
      ? (host, flush, lastFlush) => {
18
          observe(host, flush(), lastFlush);
12✔
19
        }
20
      : (host, flush) => {
21
          flush();
138✔
22
        },
23
  };
24

25
  const shadowOptions = desc.shadow
24!
26
    ? {
27
        mode: desc.shadow.mode || "open",
×
28
        delegatesFocus: desc.shadow.delegatesFocus || false,
×
29
      }
30
    : desc.shadow;
31

32
  return {
24✔
33
    value: (host) => {
34
      const updateDOM = fn(host);
150✔
35
      return () => updateDOM(host, shadowOptions);
162✔
36
    },
37
    ...rest,
38
  };
39
}
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