1 line
1.3 MiB
JSON
1 line
1.3 MiB
JSON
|
{"id":"node_modules/chai/lib/chai/core/assertions.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/package.json","includedInParent":true,"mtime":1542058764034}],"generated":{"js":"function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * chai\n * http://chaijs.com\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nmodule.exports = function (chai, _) {\n var Assertion = chai.Assertion,\n AssertionError = chai.AssertionError,\n flag = _.flag;\n /**\n * ### Language Chains\n *\n * The following are provided as chainable getters to improve the readability\n * of your assertions.\n *\n * **Chains**\n *\n * - to\n * - be\n * - been\n * - is\n * - that\n * - which\n * - and\n * - has\n * - have\n * - with\n * - at\n * - of\n * - same\n * - but\n * - does\n * - still\n *\n * @name language chains\n * @namespace BDD\n * @api public\n */\n\n ['to', 'be', 'been', 'is', 'and', 'has', 'have', 'with', 'that', 'which', 'at', 'of', 'same', 'but', 'does', 'still'].forEach(function (chain) {\n Assertion.addProperty(chain);\n });\n /**\n * ### .not\n *\n * Negates all assertions that follow in the chain.\n *\n * expect(function () {}).to.not.throw();\n * expect({a: 1}).to.not.have.property('b');\n * expect([1, 2]).to.be.an('array').that.does.not.include(3);\n *\n * Just because you can negate any assertion with `.not` doesn't mean you\n * should. With great power comes great responsibility. It's often best to\n * assert that the one expected output was produced, rather than asserting\n * that one of countless unexpected outputs wasn't produced. See individual\n * assertions for specific guidance.\n *\n * expect(2).to.equal(2); // Recommended\n * expect(2).to.not.equal(1); // Not recommended\n *\n * @name not\n * @namespace BDD\n * @api public\n */\n\n Assertion.addProperty('not', function () {\n flag(this, 'negate', true);\n });\n /**\n * ### .deep\n *\n * Causes all `.equal`, `.include`, `.members`, `.keys`, and `.property`\n * assertions that follow in the chain to use deep equality instead of strict\n * (`===`) equality. See the `deep-eql` project page for info on the deep\n * equality algorithm: https://github.com/chaijs/deep-eql.\n *\n * // Target object deeply (but not strictly) equals `{a: 1}`\n * expect({a: 1}).to.deep.equal({a: 1});\n * expect({a: 1}).to.not.equal({a: 1});\n *\n * // Target array deeply (but not strictly) includes `{a: 1}`\n * expect([{a: 1}]).to.deep.include({a: 1});\n * expect([{a: 1}]).to.not.include({a: 1});\n *\n * // Target object deeply (but not strictly) includes `x: {a: 1}`\n * expect({x: {a: 1}}).to.deep.include({x: {a: 1}});\n * expect({x: {a: 1}}).to.not.include({x: {a: 1}});\n *\n * // Target array deeply (but not strictly) has member `{a: 1}`\n * expect([{a: 1}]).to.have.deep.members([{a: 1}]);\n * expect([{a: 1}]).to.not.have.members([{a: 1}]);\n *\n * // Target set deeply (but not strictly) has key `{a: 1}`\n * expect(new Set([{a: 1}])).to.have.deep.keys([{a: 1}]);\n * expect(new Set([{a: 1}])).to.not.have.keys([{a: 1}]);\n *\n * // Target object deeply (but not strictly) has property `x: {a: 1}`\n * expect({x: {a: 1}}).to.have.deep.property('x', {a: 1});\n * expect({x: {a: 1}}).to.not.have.property('x', {a: 1});\n *\n * @name deep\n * @namespace BDD\n * @api public\n */\n\n Assertion.addP
|