mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
686 B
23 lines
686 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { Version } from './version';
|
|
|
|
describe('Version', () => {
|
|
it('should initialize with init value', () => {
|
|
const version = new Version('1.0');
|
|
|
|
expect(version.value).toBe('1.0');
|
|
});
|
|
|
|
it('should ignore prefix for equal comparison', () => {
|
|
expect(new Version('2').eq(new Version('2'))).toBeTruthy();
|
|
expect(new Version('2').eq(new Version('W/2'))).toBeTruthy();
|
|
expect(new Version('W/2').eq(new Version('2'))).toBeTruthy();
|
|
expect(new Version('W/2').eq(new Version('W/2'))).toBeTruthy();
|
|
});
|
|
});
|
|
|