2024-10-20 19:26:36 +02:00
|
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
|
2021-04-03 12:17:48 +02:00
|
|
|
import { isVersionValid } from '../src/utils';
|
|
|
|
|
2024-10-20 19:26:36 +02:00
|
|
|
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();
|
|
|
|
});
|
2021-04-03 12:17:48 +02:00
|
|
|
|
2024-10-20 19:26:36 +02:00
|
|
|
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();
|
|
|
|
});
|
2021-04-03 12:17:48 +02:00
|
|
|
});
|