test: add coverage for none check method, re-scan update, icon registry

This commit is contained in:
Pouzor
2026-03-08 01:12:32 +01:00
parent b2a6651db7
commit f93afd0646
4 changed files with 192 additions and 1 deletions
@@ -1,5 +1,6 @@
import { describe, it, expect } from 'vitest'
import { NODE_TYPE_LABELS, STATUS_COLORS, EDGE_TYPE_LABELS } from '@/types'
import type { CheckMethod } from '@/types'
describe('NODE_TYPE_LABELS', () => {
it('has an entry for every node type', () => {
@@ -33,3 +34,14 @@ describe('EDGE_TYPE_LABELS', () => {
})
})
})
describe('CheckMethod', () => {
it('includes none as a valid check method', () => {
const methods: CheckMethod[] = ['none', 'ping', 'http', 'https', 'tcp', 'ssh', 'prometheus', 'health']
// All values are valid CheckMethod — this is a compile-time type check;
// runtime test just ensures the array is well-formed
expect(methods).toContain('none')
expect(methods).toContain('ping')
expect(methods.length).toBe(8)
})
})