mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-23 22:27:34 -05:00
16 lines
581 B
TypeScript
16 lines
581 B
TypeScript
import { isVersionValid } from '../src/utils';
|
|
|
|
test('valid version node.js', () => {
|
|
expect(isVersionValid('v14.0.0')).toBeTruthy();
|
|
expect(isVersionValid('v15.0.0')).toBeTruthy();
|
|
expect(isVersionValid('v16.0.0')).toBeTruthy();
|
|
expect(isVersionValid('v17.0.0')).toBeTruthy();
|
|
});
|
|
|
|
test('is invalid version node.js', () => {
|
|
expect(isVersionValid('v13.0.0')).toBeFalsy();
|
|
expect(isVersionValid('v12.0.0')).toBeFalsy();
|
|
expect(isVersionValid('v8.0.0')).toBeFalsy();
|
|
expect(isVersionValid('v4.0.0')).toBeFalsy();
|
|
expect(isVersionValid('v0.0.10')).toBeFalsy();
|
|
});
|