Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/expect/_utils.ts

Deno standard library
Go to Latest
File
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import type { EqualOptions, EqualOptionUtil } from "./_types.ts";
export function buildEqualOptions(options: EqualOptionUtil): EqualOptions { const { customMessage, customTesters = [], strictCheck } = options || {}; return { customTesters, msg: customMessage, strictCheck, };}
export function isPromiseLike(value: unknown): value is PromiseLike<unknown> { if (value == null) { return false; } else { return typeof ((value as Record<string, unknown>).then) === "function"; }}