Sha256: 98bfb9a9672b0d447239f809af786357533d5a49cda7b9fa281c456f417e1ba3
Contents?: true
Size: 390 Bytes
Versions: 8
Compression:
Stored size: 390 Bytes
Contents
/*! * Attach chai to global */ global.chai = require('chai'); /*! * Provide check for fail function. */ global.err = function (fn, msg) { try { fn(); throw new chai.AssertionError('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