UNPKG

@livekit/components-core

Version:

This package is a wrapper around the [livekit/client-sdk-js](https://github.com/livekit/client-sdk-js) package. It transforms the event based logic into simple to use observable state and component level APIs. This package is the core for all framework sp

14 lines (12 loc) 482 B
import { describe, test, expect } from 'vitest'; import { createUrlRegExp } from './url-regex'; describe('url-regex', () => { test('should match urls', () => { // Valid URLs expect(createUrlRegExp({}).test('http://www.livekit.com')).toBe(true); expect(createUrlRegExp({}).test('www.livekit.com')).toBe(true); expect(createUrlRegExp({}).test('livekit.com')).toBe(true); // Invalid URLs expect(createUrlRegExp({}).test('livekitcom')).toBe(false); }); });