Module

x/chai/lib/chai/utils/proxify.js>proxify

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
Latest
function proxify
import { proxify } from "https://dotland.deno.dev/x/chai@v5.1.2/lib/chai/utils/proxify.js";

.proxify(object)

Return a proxy of given object that throws an error when a non-existent property is read. By default, the root cause is assumed to be a misspelled property, and thus an attempt is made to offer a reasonable suggestion from the list of existing properties. However, if a nonChainableMethodName is provided, then the root cause is instead a failure to invoke a non-chainable method prior to reading the non-existent property.

If proxies are unsupported or disabled via the user's Chai config, then return object without modification.

Parameters

obj
nonChainableMethodName