mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-10 00:29:41 +00:00
de9a7a87fd
* refactor(project structure): UI * refactor(project structure): extract utilities * refactor(project structure): remove unused * refactor(project structure): electron * refactor(project structure): server refactor: migrate to vitest refactor: monorepo config * refactor: extract application menu * refactor: exit process * refactor: extract tray menu * chore: electron build * Added Seconds in studio clock #282 --------- Co-authored-by: Fabian Posenau <fabian@fphome.de> --------- Co-authored-by: Fabian Posenau <fabian.p99@gmx.de> Co-authored-by: Fabian Posenau <fabian@fphome.de>
26 lines
504 B
JavaScript
26 lines
504 B
JavaScript
import { validateAlias } from '../aliases';
|
|
|
|
describe('An alias fails if incorrect', () => {
|
|
const testsToFail = [
|
|
// no empty
|
|
'',
|
|
// no https, http or www
|
|
'https://www.test.com',
|
|
'http://www.test.com',
|
|
'www.test.com',
|
|
// no hostname
|
|
'localhost/test',
|
|
'127.0.0.1/test',
|
|
'0.0.0.0/test',
|
|
// no editor
|
|
'editor',
|
|
'editor?test',
|
|
];
|
|
|
|
testsToFail.forEach((t) =>
|
|
it(`${t}`, () => {
|
|
expect(validateAlias(t).status).toBeFalsy();
|
|
}),
|
|
);
|
|
});
|