source: imaps-frontend/node_modules/uuid/dist/esm-browser/test/version.test.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 673 bytes
Line 
1import * as assert from 'assert';
2import test, { describe } from 'node:test';
3import version from '../version.js';
4import { TESTS } from './test_constants.js';
5describe('version()', () => {
6 test('TESTS cases', () => {
7 for (const { value, expectedValidate, expectedVersion } of TESTS) {
8 try {
9 const actualVersion = version(value);
10 assert.ok(expectedValidate, `version(${value}) should throw`);
11 assert.strictEqual(actualVersion, expectedVersion);
12 }
13 catch {
14 assert.ok(!expectedValidate, `version(${value}) threw unexpectedly`);
15 }
16 }
17 });
18});
Note: See TracBrowser for help on using the repository browser.