deno.land / std@0.224.0 / semver / is_range_test.ts

is_range_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
27
28
29
30
31
32
33
34
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.import { assert } from "../assert/mod.ts";import { ALL, MIN } from "./constants.ts";import { formatRange } from "./format_range.ts";import { isRange } from "./is_range.ts";import type { Range } from "./types.ts";
Deno.test({ name: "isRange()", fn: async (t) => { const ranges: Range[] = [[ [ALL], ], [ [{ operator: ">=", major: 0, minor: 0, patch: 0, prerelease: [], build: [], }, { operator: "<", ...MIN, }], ]]; for (const r of ranges) { await t.step(`${formatRange(r)}`, () => { const actual = isRange(r); assert(actual); }); } },});
std

Version Info

Tagged at
3 weeks ago