mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
657cc22b44
* feat: parse cue * refactor: get delay from backend * feat: add cue to UI * refactor: remove deprecated delay logic * refactor: extract studio clock specific logic * refactor: extract utilities * refactor: fix issue with missing key * style: prevent cue overflow * style: prevent whitespace wrap * feat: add support for cues in integrations
34 lines
937 B
TypeScript
34 lines
937 B
TypeScript
import { cleanURL } from '../url.js';
|
|
|
|
describe('url is correctly formatted', () => {
|
|
it('has no leading spaces', () => {
|
|
const test = ' http://testing';
|
|
const expected = 'http://testing';
|
|
expect(cleanURL(test)).toBe(expected);
|
|
});
|
|
|
|
it('has no trailing spaces', () => {
|
|
const test = 'http://testing ';
|
|
const expected = 'http://testing';
|
|
expect(cleanURL(test)).toBe(expected);
|
|
});
|
|
|
|
it('doesnt contain spaces', () => {
|
|
const test = 'http://t e s t i n g';
|
|
const expected = 'http://t%20e%20s%20t%20i%20n%20g';
|
|
expect(cleanURL(test)).toBe(expected);
|
|
});
|
|
|
|
it('only contains allowed characters', () => {
|
|
const test = 'http://<>[]{}|^';
|
|
const expected = 'http://';
|
|
expect(cleanURL(test)).toBe(expected);
|
|
});
|
|
|
|
it('begins with http://', () => {
|
|
const test = 'ontime.com';
|
|
const expected = 'http://ontime.com';
|
|
expect(cleanURL(test)).toBe(expected);
|
|
});
|
|
});
|