Skip to content

Commit

Permalink
Update src/utils/__tests__/version.test.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Burak Yigit Kaya <ben@byk.im>
  • Loading branch information
vaind and BYK authored Jun 28, 2024
1 parent ab11ace commit 8f7a924
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/utils/__tests__/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,10 @@ describe('versionGreaterOrEqualThan', () => {
});

test('can compare pre parts', () => {
const v1 = parseVersion('1.2.3-1');
const v2 = parseVersion('1.2.3-2');
expect(v1).not.toBeNull();
expect(v2).not.toBeNull();
expect(versionGreaterOrEqualThan(v1 as SemVer, v2 as SemVer)).toBe(false);
expect(versionGreaterOrEqualThan(v2 as SemVer, v1 as SemVer)).toBe(true);
const v1 = parseVersion('1.2.3-1') as SemVer;
const v2 = parseVersion('1.2.3-2') as SemVer;
expect(versionGreaterOrEqualThan(v1, v2)).toBe(false);
expect(versionGreaterOrEqualThan(v2, v1)).toBe(true);
});

test('throws an exception if there are build parts', () => {
Expand Down

0 comments on commit 8f7a924

Please sign in to comment.