Sha256: df8681abbf48d5e28cfcd88bb81b42c7801e3bd6f1510469cf97fd5f898a6b54

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

describe('plugins', function () {

  function plugin (chai) {
    if (chai.Assertion.prototype.testing) return;

    Object.defineProperty(chai.Assertion.prototype, 'testing', {
      get: function () {
        return 'successful';
      }
    });
  }

  it('basic usage', function () {
    chai.use(plugin);
    var expect = chai.expect;
    expect(expect('').testing).to.equal('successful');
  });

  it('double plugin', function () {
    chai.expect(function () {
      chai.use(plugin);
    }).to.not.throw();
  });
});

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/plugins.js
ende-0.5.21 components/indefinido/indemma/master/components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.6 components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.5 components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.4 components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.3 components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.2 components/chaijs/chai/1.9.1/test/plugins.js
ende-0.5.1 components/chaijs/chai/1.9.1/test/plugins.js