import assert from 'node:assert/strict'
import test from 'node:test'

import { normalizeAdminRole } from './admin-auth-service.js'

test('normalizeAdminRole preserves the dedicated finance role', () => {
  assert.equal(normalizeAdminRole('finance'), 'finance')
  assert.equal(normalizeAdminRole('FINANCE'), 'finance')
})

test('normalizeAdminRole keeps unknown roles compatible as operator', () => {
  assert.equal(normalizeAdminRole('unknown-role'), 'operator')
})
