Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add std/expect #3814

Merged
merged 17 commits into from
Nov 21, 2023
13 changes: 13 additions & 0 deletions expect/_inspect_args.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
// deno-lint-ignore-file

export function inspectArgs(args: unknown[]): string {
return args.map(inspectArg).join(", ");
}

export function inspectArg(arg: unknown): string {
const { Deno } = globalThis as any;
return typeof Deno !== "undefined" && Deno.inspect
? Deno.inspect(arg)
: String(arg);
}
Loading