summaryrefslogtreecommitdiff
path: root/std/uuid/tests/isNil.ts
blob: 7719f1229e3efaabdce29592cdabab295c75582c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { assert } from "../../testing/asserts.ts";
const { test } = Deno;
// @ts-ignore
import { NIL_UUID, isNil } from "../mod.ts";

test({
  name: "[UUID] isNil",
  fn(): void {
    const nil = NIL_UUID;
    const u = "582cbcff-dad6-4f28-888a-e062ae36bafc";
    assert(isNil(nil));
    assert(!isNil(u));
  }
});