const mikrotik = require('./services/mikrotikService'); // Mock getInterfaces to return the user's specific pattern mikrotik.getInterfaces = async () => { return [ { name: '', type: 'pppoe-in' }, { name: 'ether1', type: 'ether' }, { name: 'vlan_88_PtP_Dell', type: 'vlan' } ]; }; async function test() { console.log("Testing Pattern Matching..."); const inputs = ['221128130266', '']; for (const input of inputs) { const found = await mikrotik.findInterface(input); if (found) { console.log(`MATCH: '${input}' -> '${found.name}'`); } else { console.log(`NO MATCH: '${input}'`); } } } test();