astro-ghostcms/.pnpm-store/v3/files/27/51091f4d7929acd7ceb538462ef...

29 lines
540 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
/*!
* Chai - test utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var flag = require('./flag');
/**
* ### .test(object, expression)
*
* Test an object for expression.
*
* @param {Object} object (constructed Assertion)
* @param {Arguments} chai.Assertion.prototype.assert arguments
* @namespace Utils
* @name test
*/
module.exports = function test(obj, args) {
var negate = flag(obj, 'negate')
, expr = args[0];
return negate ? !expr : expr;
};