2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2024-04-29 02:57:30 +00:00
|
|
|
import { assertEquals } from "@std/assert";
|
2023-05-02 14:51:43 +00:00
|
|
|
import {
|
|
|
|
NAMESPACE_DNS,
|
|
|
|
NAMESPACE_OID,
|
|
|
|
NAMESPACE_URL,
|
|
|
|
NAMESPACE_X500,
|
|
|
|
} from "./constants.ts";
|
|
|
|
import { validate } from "./mod.ts";
|
|
|
|
|
2023-12-20 21:52:37 +00:00
|
|
|
Deno.test("validate() validates the pre-defined namespaces", () => {
|
2023-05-02 14:51:43 +00:00
|
|
|
assertEquals(validate(NAMESPACE_DNS), true);
|
|
|
|
assertEquals(validate(NAMESPACE_URL), true);
|
|
|
|
assertEquals(validate(NAMESPACE_OID), true);
|
|
|
|
assertEquals(validate(NAMESPACE_X500), true);
|
|
|
|
});
|