0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/packages/cli/test/utils.spec.ts
Juan Picado e93d6a30a4
chore: vitest migration part 5 (#4914)
* migrate web package to vitest

* migrate node-api to vitest

* migrate file-locking vitest

* migrate cli

* remove jest from npm packages

* Create weak-cherries-serve.md

* update ci
2024-10-20 19:26:36 +02:00

20 lines
687 B
TypeScript

import { describe, expect, test } from 'vitest';
import { isVersionValid } from '../src/utils';
describe('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();
});
});