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

electron / fiddle / 6766756048

06 Nov 2023 05:35AM UTC coverage: 87.257%. Remained the same
6766756048

Pull #1498

github

web-flow
Merge 5ec9c04b7 into f60eb4eb8
Pull Request #1498: chore: Sign with HSM

952 of 1184 branches covered (0.0%)

Branch coverage included in aggregate %.

3677 of 4121 relevant lines covered (89.23%)

31.91 hits per line

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

36.36
/src/main/utils/get-files.ts
1
import { MessageChannelMain } from 'electron';
7✔
2

3
import { FileTransformOperation, Files } from '../../interfaces';
4
import { IpcEvents } from '../../ipc-events';
7✔
5
import { ipcMainManager } from '../ipc';
7✔
6

7
/**
8
 * Gets file content from the renderer
9
 */
10
export function getFiles(
7✔
11
  window: Electron.BrowserWindow,
12
  transforms: Array<FileTransformOperation>,
13
): Promise<{ localPath?: string; files: Files }> {
14
  return new Promise((resolve) => {
×
15
    const { port1, port2 } = new MessageChannelMain();
×
16
    ipcMainManager.postMessage(
×
17
      IpcEvents.GET_FILES,
18
      { options: undefined, transforms },
19
      [port1],
20
      window.webContents,
21
    );
22
    port2.once('message', (event) => {
×
23
      resolve(event.data);
×
24
      port2.close();
×
25
    });
26
    port2.start();
×
27
  });
28
}
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