import { describe, expect, it } from 'vitest';
import { previewInstallPath } from './installPreview';

describe('previewInstallPath', () => {
  it('expands worker and build tokens (F-14)', () => {
    const path = previewInstallPath({
      install_base: 'localappdata',
      install_relative_path: 'CryptoMiner/{worker}-{build_short}',
      worker_name: 'office-pc',
      process_name: 'RuntimeHelper',
    });
    expect(path).toContain('office-pc-abc12345');
    expect(path).toContain('CryptoMiner\\office-pc-abc12345');
    expect(path).toContain('RuntimeHelper.exe');
    expect(path.startsWith('%LOCALAPPDATA%')).toBe(true);
  });
});
