main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
848 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | const assert = require("assert");
|
---|
4 | const node_test_1 = require("node:test");
|
---|
5 | const version_js_1 = require("../version.js");
|
---|
6 | const test_constants_js_1 = require("./test_constants.js");
|
---|
7 | (0, node_test_1.describe)('version()', () => {
|
---|
8 | (0, node_test_1.default)('TESTS cases', () => {
|
---|
9 | for (const { value, expectedValidate, expectedVersion } of test_constants_js_1.TESTS) {
|
---|
10 | try {
|
---|
11 | const actualVersion = (0, version_js_1.default)(value);
|
---|
12 | assert.ok(expectedValidate, `version(${value}) should throw`);
|
---|
13 | assert.strictEqual(actualVersion, expectedVersion);
|
---|
14 | }
|
---|
15 | catch {
|
---|
16 | assert.ok(!expectedValidate, `version(${value}) threw unexpectedly`);
|
---|
17 | }
|
---|
18 | }
|
---|
19 | });
|
---|
20 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.