2024-04-24 08:02:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
import { assertEquals } from "@std/assert";
|
2024-04-24 08:02:32 +00:00
|
|
|
import { error } from "./error.ts";
|
|
|
|
|
|
|
|
Deno.test("error()", () => {
|
|
|
|
const errorData: undefined = error(undefined, 1, 2, 3);
|
|
|
|
const errorResolver: bigint | undefined = error(() => 5n);
|
|
|
|
assertEquals(errorData, undefined);
|
|
|
|
assertEquals(errorResolver, 5n);
|
|
|
|
});
|