Files
FileBow/tests/native-monitor.cjs
T

5 lines
515 B
JavaScript

const {WindowsBridge}=require('../src/main/windows.cjs');
const fs=require('node:fs'),path=require('node:path');
const root=path.resolve(__dirname,'..'),log=path.join(root,'test-results/native-drag.json');
(async()=>{const bridge=new WindowsBridge(root);const events=[];await bridge.startFileDragMonitor(event=>{events.push(event);fs.writeFileSync(log,JSON.stringify(events,null,2));});console.log('Monitor ready');setTimeout(()=>bridge.close(),60000);})().catch(error=>{console.error(error);process.exitCode=1;});