const assert=require('node:assert/strict');global.window={};require('../../static/js/company-contacts.js'); const helpers={name:c=>`${c.first_name} ${c.last_name}`,phone:c=>c.phone||'',mobile:c=>c.mobile||'',actions:()=>''}; const contacts=[{id:1,first_name:'Ida',last_name:'Hansen',email:'ida@example.com',title:'Support',phone:'12345678',is_primary:true},{id:2,first_name:'Poul',last_name:'Larsen',title:'Salg'}]; assert.equal(window.CompanyContacts.filter(contacts,'support',false,helpers).length,1); assert.equal(window.CompanyContacts.filter(contacts,'',true,helpers).length,1); assert.equal(window.CompanyContacts.filter(contacts,'',false,helpers).length,2); const malicious={id:3,first_name:'