Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

726 B
Raw Blame
import { getClientBuildId } from './build';

describe('loaded client build identity', () => {
  afterEach(() => document.querySelectorAll('[data-lc-client-entry]').forEach((el) => el.remove()));

  it('uses the loaded entry filename, without query parameters or deployment subpath', () => {
    const script = document.createElement('script');
    script.setAttribute('data-lc-client-entry', '');
    script.type = 'module';
    script.src = '/chat/assets/index-abc123.js?secret=hidden#fragment';
    document.head.append(script);
    expect(getClientBuildId()).toBe('index-abc123.js');
  });

  it('does not invent an identity when the entry is unavailable', () => {
    expect(getClientBuildId()).toBe('unknown');
  });
});