Create the NAP-TORRENT mock.
Engine pacing options.
The mock service with an advance() control.
advance()
const torrent = createMockTorrentService();const source = { sourceType: 'magnet', magnet: LINUX_DISTROS[0].magnet };torrent.handleMessage('win', { type: 'torrent.add', id: 'a1', request: { source } }, console.log);torrent.advance(5); // metadata, four progress pushes, then complete Copy
const torrent = createMockTorrentService();const source = { sourceType: 'magnet', magnet: LINUX_DISTROS[0].magnet };torrent.handleMessage('win', { type: 'torrent.add', id: 'a1', request: { source } }, console.log);torrent.advance(5); // metadata, four progress pushes, then complete
Create the NAP-TORRENT mock.