import { test } from 'node:test';
import assert from 'node:assert/strict';
import {
  ZONE_CHECKIN_COLORS,
  isZoneCheckinColor,
} from '@/shared/constants/zone-checkin';

test('the zone colors are blue/green/yellow/red', () => {
  assert.deepEqual([...ZONE_CHECKIN_COLORS], ['blue', 'green', 'yellow', 'red']);
});

test('isZoneCheckinColor accepts the four zones and rejects anything else', () => {
  for (const color of ZONE_CHECKIN_COLORS) {
    assert.equal(isZoneCheckinColor(color), true);
  }
  assert.equal(isZoneCheckinColor('purple'), false);
  assert.equal(isZoneCheckinColor(''), false);
  assert.equal(isZoneCheckinColor(null), false);
  assert.equal(isZoneCheckinColor(undefined), false);
});
