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

worktile / slate-angular / 538f75c8-caf2-4d27-9bda-fd89bebf697f

31 Mar 2025 01:55AM CUT coverage: 46.776%. Remained the same
538f75c8-caf2-4d27-9bda-fd89bebf697f

push

circleci

pubuzhixing8
build: release 19.0.0

409 of 1075 branches covered (38.05%)

Branch coverage included in aggregate %.

1020 of 1980 relevant lines covered (51.52%)

43.99 hits per line

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

20.51
/packages/src/utils/clipboard/common.ts
1
export const isClipboardReadSupported = () => {
1✔
2
    return 'clipboard' in navigator && 'read' in navigator.clipboard;
×
3
};
4

5
export const isClipboardWriteSupported = () => {
1✔
6
    return 'clipboard' in navigator && 'write' in navigator.clipboard;
×
7
};
8

9
export const isClipboardWriteTextSupported = () => {
1✔
10
    return 'clipboard' in navigator && 'writeText' in navigator.clipboard;
×
11
};
12

13
export const isClipboardFile = (item: ClipboardItem) => {
1✔
14
    return item.types.find(i => i.match(/^image\//));
×
15
};
16

17
export const isInvalidTable = (nodes: Element[] = []) => {
1!
18
    return nodes.some(node => node.tagName.toLowerCase() === 'tr');
×
19
};
20

21
export const stripHtml = (html: string) => {
1✔
22
    // See <https://github.com/developit/preact-markup/blob/4788b8d61b4e24f83688710746ee36e7464f7bbc/src/parse-markup.js#L60-L69>
23
    const doc = document.implementation.createHTMLDocument('');
×
24
    doc.documentElement.innerHTML = html.trim();
×
25
    return doc.body.textContent || doc.body.innerText || '';
×
26
};
27

28
export const blobAsString = (blob: Blob) => {
1✔
29
    return new Promise<string>((resolve, reject) => {
×
30
        const reader = new FileReader();
×
31
        reader.addEventListener('loadend', () => {
×
32
            const text = reader.result;
×
33
            resolve(text as string);
×
34
        });
35
        reader.addEventListener('error', () => {
×
36
            reject(reader.error);
×
37
        });
38
        reader.readAsText(blob);
×
39
    });
40
};
41

42
export const completeTable = (fragment: DocumentFragment) => {
1✔
43
    const result = document.createDocumentFragment();
×
44
    const table = document.createElement('table');
×
45
    result.appendChild(table);
×
46
    table.appendChild(fragment);
×
47
    return result;
×
48
};
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