// Test directly with typescript - create a TypeScript test instead

console.log('This should be run as a TypeScript test or in a jest environment...');

// Test cases
const actionsArray = [
  { name: 'slide-display', value: '# Test Slide' },
  { name: 'author-speak-before', value: 'Test speech' },
  { name: 'external-web-preview', value: 'https://example.com' }
];

const lesson = {
  id: 'test-lesson',
  name: 'Test Lesson',
  description: 'A test lesson',
  actions: actionsArray
};

const course = {
  id: 'test-course',
  name: 'Test Course',
  description: 'A test course',
  primaryLanguage: 'typescript',
  lessons: [lesson]
};

console.log('Testing extractActionsFromProject...');
console.log('========================================');

console.log('\n1. Array<IAction> project:');
console.log('Input:', actionsArray);
try {
  const result1 = extractActionsFromProject(actionsArray, null);
  console.log('Output:', result1);
  console.log('Length:', result1?.length || 0);
} catch (e) {
  console.log('Error:', e.message);
}

console.log('\n2. ILesson project:');
console.log('Input lesson.actions:', lesson.actions);
try {
  const result2 = extractActionsFromProject(lesson, null);
  console.log('Output:', result2);
  console.log('Length:', result2?.length || 0);
} catch (e) {
  console.log('Error:', e.message);
}

console.log('\n3. ICourse project (lesson index 0):');
console.log('Input course.lessons[0].actions:', course.lessons[0].actions);
try {
  const result3 = extractActionsFromProject(course, 0);
  console.log('Output:', result3);
  console.log('Length:', result3?.length || 0);
} catch (e) {
  console.log('Error:', e.message);
}
