Sha256: aa5f1ecd408d127babbec24dc060bf159412d4737af49c2b3f6f62dfabd94ed2

Contents?: true

Size: 404 Bytes

Versions: 8

Compression:

Stored size: 404 Bytes

Contents

/*!
 * Attach chai to global
 */

global.chai = require('../..');

/*!
 * Provide check for fail function.
 */

global.err = function (fn, msg) {
  try {
    fn();
    throw new chai.AssertionError({ message: 'Expected an error' });
  } catch (err) {
    if ('string' === typeof msg) {
      chai.expect(err.message).to.equal(msg);
    } else {
      chai.expect(err.message).to.match(msg);
    }
  }
};

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ende-0.5.22 components/indefinido/indemma/master/components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.21 components/indefinido/indemma/master/components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.6 components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.5 components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.4 components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.3 components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.2 components/chaijs/chai/1.9.1/test/bootstrap/index.js
ende-0.5.1 components/chaijs/chai/1.9.1/test/bootstrap/index.js