diff --git a/nodejs/tests/plugins.test.js b/nodejs/tests/plugins.test.js index 691b996..2d635ee 100644 --- a/nodejs/tests/plugins.test.js +++ b/nodejs/tests/plugins.test.js @@ -46,7 +46,7 @@ describe('plugin_registry', () => { expect(registry.secretKeys('proxmox')).toEqual(['tokenSecret']); expect(registry.secretKeys('unifi')).toEqual(['password']); expect(registry.secretKeys('nmap')).toEqual([]); - expect(registry.publicKeys('nmap')).toEqual(['targetRange']); + expect(registry.publicKeys('nmap').sort()).toEqual(['autoPromote', 'location', 'targetRange']); }); test('splitConfig separates secret from non-secret and drops undeclared keys', () => { diff --git a/nodejs/tests/reconciler.test.js b/nodejs/tests/reconciler.test.js index f74976c..8c7ad05 100644 --- a/nodejs/tests/reconciler.test.js +++ b/nodejs/tests/reconciler.test.js @@ -25,7 +25,7 @@ describe('DiscoveryReconciler', () => { await DiscoveryReconciler.reconcile('test-plugin', payload); - const all = await Resource.list(); + const all = (await Resource.list()).filter(r => r.kind !== 'site'); expect(all).toHaveLength(1); expect(all[0].name).toBe('New Host'); expect(all[0].metadata.discovery_sources).toContain('test-plugin'); @@ -57,7 +57,7 @@ describe('DiscoveryReconciler', () => { }] }); - const all = await Resource.list(); + const all = (await Resource.list()).filter(r => r.kind !== 'site'); expect(all).toHaveLength(1); // Should have merged, not created a new one const merged = all[0];