Sha256: 2b96618411f6b7be181fa30382456b84818eaba18d62bd44bf11cccd93b64696

Contents?: true

Size: 534 Bytes

Versions: 2

Compression:

Stored size: 534 Bytes

Contents

/*!
 * Chai - test utility
 * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
 * MIT Licensed
 */

/*!
 * Module dependancies
 */

var flag = require('./flag');

/**
 * # test(object, expression)
 *
 * Test and object for expression.
 *
 * @param {Object} object (constructed Assertion)
 * @param {Arguments} chai.Assertion.prototype.assert arguments
 * @namespace Utils
 * @name test
 */

module.exports = function (obj, args) {
  var negate = flag(obj, 'negate')
    , expr = args[0];
  return negate ? !expr : expr;
};

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
mdarray-sol-0.1.0-java node_modules/chai/lib/chai/utils/test.js
select_all-rails-0.3.1 node_modules/chai/lib/chai/utils/test.js