💾 Archived View for gmi.noulin.net › gitRepositories › git-off › file › node_modules › chai › lib › … captured on 2024-09-29 at 00:33:45. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

git-off

Log

Files

Refs

README

test.js (534B)

     1 /*!
     2  * Chai - test utility
     3  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
     4  * MIT Licensed
     5  */
     6 
     7 /*!
     8  * Module dependancies
     9  */
    10 
    11 var flag = require('./flag');
    12 
    13 /**
    14  * # test(object, expression)
    15  *
    16  * Test and object for expression.
    17  *
    18  * @param {Object} object (constructed Assertion)
    19  * @param {Arguments} chai.Assertion.prototype.assert arguments
    20  * @namespace Utils
    21  * @name test
    22  */
    23 
    24 module.exports = function (obj, args) {
    25   var negate = flag(obj, 'negate')
    26     , expr = args[0];
    27   return negate ? !expr : expr;
    28 };