import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

// MLX parser uses DOMParser which is browser-only
// For unit test, we test the mapping logic directly

describe('MLX Filter Mapping', () => {
  it('mlx test fixture has valid XML', () => {
    const __dirname = dirname(fileURLToPath(import.meta.url));
    const mlx = readFileSync(resolve(__dirname, '../fixtures/test.mlx'), 'utf-8');
    expect(mlx).toContain('FilterScript');
    expect(mlx).toContain('Remove Duplicated Vertex');
    expect(mlx).toContain('Laplacian Smooth');
    expect(mlx).toContain('stepSmoothNum');
  });
});
