add test case for semver major comparisons
This commit is contained in:
parent
6b6d0617ef
commit
8a82207286
|
@ -260,12 +260,14 @@ describe('utils', () => {
|
|||
expect(gte('1.2.3', '1.2.1')).toBe(true);
|
||||
expect(gte('1.2.1', '1.2.1')).toBe(true);
|
||||
expect(gte('1.2.1', '1.2.2')).toBe(false);
|
||||
expect(gte('10.0.0', '9.0.0')).toBe(true);
|
||||
});
|
||||
|
||||
it('gt should compare versions correctly', () => {
|
||||
expect(gt('1.2.3', '1.2.1')).toBe(true);
|
||||
expect(gt('1.2.1', '1.2.1')).toBe(false);
|
||||
expect(gt('1.2.1', '1.2.2')).toBe(false);
|
||||
expect(gte('10.0.0', '9.0.0')).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue