 from 'react-dom/client';
      import { fn, spyOn } from 'jest-mock';

      run(async function () {
        const {
          testHelpers: { createDirectLineEmulator },
          WebChat: { DebugProvider, ReactWebChat }
        } = window;

        const { directLine, store } = createDirectLineEmulator();

        const onTelemetry = fn();

        // WHEN: Web Chat is being rendered with <DebugProvider>.
        createRoot(document.getElementById('webchat')).render(
          createElement(
            D