#!/usr/bin/env node
/**
 * Platform check script for test execution.
 * Warns (but doesn't block) when running tests on Windows outside a container.
 *
 * See ADR-014 for details on Linux-only requirement.
 */

const isWindows = process.platform === 'win32';
const inContainer =
  process.env.REMOTE_CONTAINERS === 'true' ||
  process.env.DEVCONTAINER === 'true' ||
  process.env.container === 'podman' ||
  process.env.container === 'docker';

if (isWindows && !inContainer) {
  console.warn('\n' + '='.repeat(70));
  console.warn('⚠️  WARNING: Running tests on Windows outside a container');
  console.warn('='.repeat(70));
  console.warn('');
  console.warn('This application is designed for Linux only. Test results on Windows');
  console.warn('may be unreliable due to path separator differences and other issues.');
  console.warn('');
  console.warn('For accurate test results, please use:');
  console.warn('  - VS Code Dev Container ("Reopen in Container")');
  console.warn('  - WSL (Windows Subsystem for Linux)');
  console.warn('  - A Linux VM or bare-metal Linux');
  console.warn('');
  console.warn('See docs/adr/0014-containerization-and-deployment-strategy.md');
  console.warn('='.repeat(70) + '\n');
}
