import { describe, expect, it } from 'vitest';
import { publicAssetUrl } from '../apps/viewer-3d/src/runtimeBase';

describe('3D public asset URL', () => {
  it('keeps decoder and preview assets under the configured deployment subpath', () => {
    expect(publicAssetUrl('draco/', '/viewer-3d/', 'https://viewer.example')).toBe(
      'https://viewer.example/viewer-3d/draco/',
    );
    expect(publicAssetUrl('/previews/Box.webp', '/viewer-3d/', 'https://viewer.example')).toBe(
      'https://viewer.example/viewer-3d/previews/Box.webp',
    );
  });
});
