deno.land / std@0.177.1 / semver / patch_test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Isaac Z. Schlueter and Contributors. All rights reserved. ISC license.// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.import { assertEquals } from "../testing/asserts.ts";import * as semver from "./mod.ts";
Deno.test("patch", function () { // [range, version] // Version should be detectable despite extra characters const versions: [string, number][] = [ ["1.2.1", 1], [" 1.2.1 ", 1], [" 1.2.2-4 ", 2], [" 1.2.3-pre ", 3], ["v1.2.5", 5], [" v1.2.8 ", 8], ["\t1.2.13", 13], ];
versions.forEach(function (tuple) { const range = tuple[0]; const version = tuple[1]; const msg = `patch(${range}) = ${version}`; assertEquals(semver.patch(range), version, msg); });});
std

Version Info

Tagged at
11 months ago