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

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

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

.transferFlags(assertion, object, includeAll = true)

Transfer all the flags for assertion to object. If includeAll is set to false, then the base Chai assertion flags (namely object, ssfi, lockSsfi, and message) will not be transferred.

var newAssertion = new Assertion();
utils.transferFlags(assertion, newAssertion);

var anotherAssertion = new Assertion(myObj);
utils.transferFlags(assertion, anotherAssertion, false);

Parameters

assertion

the assertion to transfer the flags from

object

the object to transfer the flags to; usually a new assertion

includeAll