import { test } from 'node:test';
import assert from 'node:assert/strict';
import { AUDIO_FILE_KINDS, isAudioFileKind } from '@/shared/constants/audio-files';

test('the three storage kinds are file, url, recipe', () => {
  assert.deepEqual([...AUDIO_FILE_KINDS], ['file', 'url', 'recipe']);
});

test('isAudioFileKind accepts the known kinds and rejects others', () => {
  assert.equal(isAudioFileKind('file'), true);
  assert.equal(isAudioFileKind('url'), true);
  assert.equal(isAudioFileKind('recipe'), true);
  assert.equal(isAudioFileKind('builtin'), false);
  assert.equal(isAudioFileKind(''), false);
  assert.equal(isAudioFileKind(null), false);
  assert.equal(isAudioFileKind(undefined), false);
  assert.equal(isAudioFileKind(3), false);
});
