Sha256: 433c63f9fa2018f398dd1cd29cfb4d913c5cd332fe1fc6fe04d4c8d9ca3e912b

Contents?: true

Size: 1.24 KB

Versions: 26

Compression:

Stored size: 1.24 KB

Contents

/*!
 * chai
 * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
 * MIT Licensed
 */

import * as util from './chai/utils/index.js';
import {AssertionError} from 'assertion-error';
import {config} from './chai/config.js';
import './chai/core/assertions.js';
import {expect} from './chai/interface/expect.js';
import {Assertion} from './chai/assertion.js';
import * as should from './chai/interface/should.js';
import {assert} from './chai/interface/assert.js';

const used = [];

// Assertion Error
export {AssertionError};

/**
 * # .use(function)
 *
 * Provides a way to extend the internals of Chai.
 *
 * @param {Function} fn
 * @returns {this} for chaining
 * @public
 */
export function use(fn) {
  const exports = {
    AssertionError,
    util,
    config,
    expect,
    assert,
    Assertion,
    ...should
  };

  if (!~used.indexOf(fn)) {
    fn(exports, util);
    used.push(fn);
  }

  return exports;
};

// Utility Functions
export {util};

// Configuration
export {config};

// Primary `Assertion` prototype
export * from './chai/assertion.js';

// Expect interface
export * from './chai/interface/expect.js';

// Should interface
export * from './chai/interface/should.js';

// Assert interface
export * from './chai/interface/assert.js';

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/chai/lib/chai.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/chai/lib/chai.js