smartlog-destination-devtools/.cache/12/7b9d28518085d447c63fcdd9160373.json

1 line
75 KiB
JSON
Raw Permalink Normal View History

2018-11-13 00:32:39 +00:00
{"id":"node_modules/chai/lib/chai/interface/should.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":"/*!\n * chai\n * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nmodule.exports = function (chai, util) {\n var Assertion = chai.Assertion;\n\n function loadShould() {\n // explicitly define this method as function as to have it's name to include as `ssfi`\n function shouldGetter() {\n if (this instanceof String || this instanceof Number || this instanceof Boolean || typeof Symbol === 'function' && this instanceof Symbol) {\n return new Assertion(this.valueOf(), null, shouldGetter);\n }\n\n return new Assertion(this, null, shouldGetter);\n }\n\n function shouldSetter(value) {\n // See https://github.com/chaijs/chai/issues/86: this makes\n // `whatever.should = someValue` actually set `someValue`, which is\n // especially useful for `global.should = require('chai').should()`.\n //\n // Note that we have to use [[DefineProperty]] instead of [[Put]]\n // since otherwise we would trigger this very setter!\n Object.defineProperty(this, 'should', {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } // modify Object.prototype to have `should`\n\n\n Object.defineProperty(Object.prototype, 'should', {\n set: shouldSetter,\n get: shouldGetter,\n configurable: true\n });\n var should = {};\n /**\n * ### .fail([message])\n * ### .fail(actual, expected, [message], [operator])\n *\n * Throw a failure.\n *\n * should.fail();\n * should.fail(\"custom error message\");\n * should.fail(1, 2);\n * should.fail(1, 2, \"custom error message\");\n * should.fail(1, 2, \"custom error message\", \">\");\n * should.fail(1, 2, undefined, \">\");\n *\n *\n * @name fail\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @param {String} operator\n * @namespace BDD\n * @api public\n */\n\n should.fail = function (actual, expected, message, operator) {\n if (arguments.length < 2) {\n message = actual;\n actual = undefined;\n }\n\n message = message || 'should.fail()';\n throw new chai.AssertionError(message, {\n actual: actual,\n expected: expected,\n operator: operator\n }, should.fail);\n };\n /**\n * ### .equal(actual, expected, [message])\n *\n * Asserts non-strict equality (`==`) of `actual` and `expected`.\n *\n * should.equal(3, '3', '== coerces values to strings');\n *\n * @name equal\n * @param {Mixed} actual\n * @param {Mixed} expected\n * @param {String} message\n * @namespace Should\n * @api public\n */\n\n\n should.equal = function (val1, val2, msg) {\n new Assertion(val1, msg).to.equal(val2);\n };\n /**\n * ### .throw(function, [constructor/string/regexp], [string/regexp], [message])\n *\n * Asserts that `function` will throw an error that is an instance of\n * `constructor`, or alternately that it will throw an error with message\n * matching `regexp`.\n *\n * should.throw(fn, 'function throws a reference error');\n * should.throw(fn, /function throws a reference error/);\n * should.throw(fn, ReferenceError);\n * should.throw(fn, ReferenceError, 'function throws a reference error');\n * should.throw(fn, ReferenceError, /function throws a reference error/);\n *\n * @name throw\n * @alias Throw\n * @param {Function} function\n * @param {ErrorConstructor} constructor\n * @param {RegExp} regexp\n *