1 line
31 KiB
JSON
1 line
31 KiB
JSON
{"id":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.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},{"name":"../../chai","loc":{"line":7,"column":19},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai.js"},{"name":"./transferFlags","loc":{"line":8,"column":28},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai/utils/transferFlags.js"}],"generated":{"js":"/*!\n * Chai - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nvar chai = require('../../chai');\n\nvar transferFlags = require('./transferFlags');\n/**\n * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior)\n *\n * Overwrites an already existing chainable method\n * and provides access to the previous function or\n * property. Must return functions to be used for\n * name.\n *\n * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf',\n * function (_super) {\n * }\n * , function (_super) {\n * }\n * );\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteChainableMethod('foo', fn, fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.have.lengthOf(3);\n * expect(myFoo).to.have.lengthOf.above(3);\n *\n * @param {Object} ctx object whose method / property is to be overwritten\n * @param {String} name of method / property to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @param {Function} chainingBehavior function that returns a function to be used for property\n * @namespace Utils\n * @name overwriteChainableMethod\n * @api public\n */\n\n\nmodule.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n\n chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() {\n var result = chainingBehavior(_chainingBehavior).call(this);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n\n var _method = chainableBehavior.method;\n\n chainableBehavior.method = function overwritingChainableMethodWrapper() {\n var result = method(_method).apply(this, arguments);\n\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n};","map":{"mappings":[{"generated":{"line":1,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":1,"column":0}},{"generated":{"line":6,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":0}},{"name":"chai","generated":{"line":6,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":4}},{"generated":{"line":6,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":8}},{"name":"require","generated":{"line":6,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":11}},{"generated":{"line":6,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":18}},{"generated":{"line":6,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":19}},{"generated":{"line":6,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":18}},{"generated":{"line":6,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":7,"column":0}},{"generated":{"line":8,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":0}},{"name":"transferFlags","generated":{"line":8,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":4}},{"generated":{"line":8,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":17}},{"name":"require","generated":{"line":8,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":20}},{"generated":{"line":8,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":27}},{"generated":{"line":8,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":28}},{"generated":{"line":8,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":27}},{"generated":{"line":8,"column":46},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":8,"column":0}},{"generated":{"line":9,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":10,"column":0}},{"name":"module","generated":{"line":43,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":0}},{"generated":{"line":43,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":6}},{"name":"exports","generated":{"line":43,"column":7},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":7}},{"generated":{"line":43,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":0}},{"generated":{"line":43,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"name":"overwriteChainableMethod","generated":{"line":43,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":26}},{"generated":{"line":43,"column":50},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"name":"ctx","generated":{"line":43,"column":51},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":51}},{"generated":{"line":43,"column":54},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"name":"name","generated":{"line":43,"column":56},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":56}},{"generated":{"line":43,"column":60},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"name":"method","generated":{"line":43,"column":62},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":62}},{"generated":{"line":43,"column":68},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"name":"chainingBehavior","generated":{"line":43,"column":70},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":70}},{"generated":{"line":43,"column":86},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":17}},{"generated":{"line":43,"column":88},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":88}},{"generated":{"line":44,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":2}},{"name":"chainableBehavior","generated":{"line":44,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":6}},{"generated":{"line":44,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":23}},{"name":"ctx","generated":{"line":44,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":26}},{"generated":{"line":44,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":29}},{"name":"__methods","generated":{"line":44,"column":30},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":30}},{"generated":{"line":44,"column":39},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":26}},{"name":"name","generated":{"line":44,"column":40},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":40}},{"generated":{"line":44,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":26}},{"generated":{"line":44,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":44,"column":2}},{"generated":{"line":45,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":2}},{"name":"_chainingBehavior","generated":{"line":45,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":6}},{"generated":{"line":45,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":23}},{"name":"chainableBehavior","generated":{"line":45,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":26}},{"generated":{"line":45,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":43}},{"name":"chainingBehavior","generated":{"line":45,"column":44},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":44}},{"generated":{"line":45,"column":60},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":46,"column":2}},{"name":"chainableBehavior","generated":{"line":47,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":2}},{"name":"chainableBehavior","generated":{"line":47,"column":2},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":2}},{"generated":{"line":47,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":19}},{"name":"chainingBehavior","generated":{"line":47,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":20}},{"generated":{"line":47,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":2}},{"generated":{"line":47,"column":39},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":39}},{"name":"overwritingChainableMethodGetter","generated":{"line":47,"column":48},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":48}},{"generated":{"line":47,"column":80},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":39}},{"generated":{"line":47,"column":83},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":83}},{"generated":{"line":48,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":4}},{"name":"result","generated":{"line":48,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":8}},{"generated":{"line":48,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":14}},{"name":"chainingBehavior","generated":{"line":48,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":17}},{"generated":{"line":48,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":33}},{"name":"_chainingBehavior","generated":{"line":48,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":34}},{"generated":{"line":48,"column":51},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":33}},{"generated":{"line":48,"column":52},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":17}},{"name":"call","generated":{"line":48,"column":53},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":53}},{"generated":{"line":48,"column":57},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":17}},{"generated":{"line":48,"column":58},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":58}},{"generated":{"line":48,"column":62},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":17}},{"generated":{"line":48,"column":63},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":48,"column":4}},{"generated":{"line":50,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":4}},{"name":"result","generated":{"line":50,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":8}},{"generated":{"line":50,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":14}},{"name":"undefined","generated":{"line":50,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":19}},{"generated":{"line":50,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":4}},{"generated":{"line":50,"column":30},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":49,"column":30}},{"generated":{"line":51,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":50,"column":6}},{"name":"result","generated":{"line":51,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":50,"column":13}},{"generated":{"line":51,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":50,"column":6}},{"generated":{"line":52,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":51,"column":5}},{"generated":{"line":54,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":4}},{"name":"newAssertion","generated":{"line":54,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":8}},{"generated":{"line":54,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":20}},{"generated":{"line":54,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":23}},{"name":"chai","generated":{"line":54,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":27}},{"generated":{"line":54,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":31}},{"name":"Assertion","generated":{"line":54,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":32}},{"generated":{"line":54,"column":41},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":23}},{"generated":{"line":54,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":53,"column":4}},{"name":"transferFlags","generated":{"line":55,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":4}},{"name":"transferFlags","generated":{"line":55,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":4}},{"generated":{"line":55,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":17}},{"generated":{"line":55,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":18}},{"generated":{"line":55,"column":22},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":17}},{"name":"newAssertion","generated":{"line":55,"column":24},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":24}},{"generated":{"line":55,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":17}},{"generated":{"line":55,"column":37},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":54,"column":4}},{"generated":{"line":56,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":55,"column":4}},{"name":"newAssertion","generated":{"line":56,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":55,"column":11}},{"generated":{"line":56,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":55,"column":4}},{"generated":{"line":57,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":56,"column":3}},{"generated":{"line":57,"column":3},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":47,"column":2}},{"generated":{"line":59,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":2}},{"name":"_method","generated":{"line":59,"column":6},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":6}},{"generated":{"line":59,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":13}},{"name":"chainableBehavior","generated":{"line":59,"column":16},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":16}},{"generated":{"line":59,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":33}},{"name":"method","generated":{"line":59,"column":34},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":34}},{"generated":{"line":59,"column":40},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":58,"column":2}},{"name":"chainableBehavior","generated":{"line":61,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":2}},{"name":"chainableBehavior","generated":{"line":61,"column":2},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":2}},{"generated":{"line":61,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":19}},{"name":"method","generated":{"line":61,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":20}},{"generated":{"line":61,"column":26},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":2}},{"generated":{"line":61,"column":29},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":29}},{"name":"overwritingChainableMethodWrapper","generated":{"line":61,"column":38},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":38}},{"generated":{"line":61,"column":71},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":29}},{"generated":{"line":61,"column":74},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":74}},{"generated":{"line":62,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":4}},{"name":"result","generated":{"line":62,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":8}},{"generated":{"line":62,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":14}},{"name":"method","generated":{"line":62,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":17}},{"generated":{"line":62,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":23}},{"name":"_method","generated":{"line":62,"column":24},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":24}},{"generated":{"line":62,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":23}},{"generated":{"line":62,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":17}},{"name":"apply","generated":{"line":62,"column":33},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":33}},{"generated":{"line":62,"column":38},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":17}},{"generated":{"line":62,"column":39},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":39}},{"generated":{"line":62,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":17}},{"name":"arguments","generated":{"line":62,"column":45},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":45}},{"generated":{"line":62,"column":54},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":17}},{"generated":{"line":62,"column":55},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":60,"column":4}},{"generated":{"line":64,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":4}},{"name":"result","generated":{"line":64,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":8}},{"generated":{"line":64,"column":14},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":14}},{"name":"undefined","generated":{"line":64,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":19}},{"generated":{"line":64,"column":28},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":4}},{"generated":{"line":64,"column":30},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":61,"column":30}},{"generated":{"line":65,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":62,"column":6}},{"name":"result","generated":{"line":65,"column":13},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":62,"column":13}},{"generated":{"line":65,"column":19},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":62,"column":6}},{"generated":{"line":66,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":63,"column":5}},{"generated":{"line":68,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":4}},{"name":"newAssertion","generated":{"line":68,"column":8},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":8}},{"generated":{"line":68,"column":20},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":20}},{"generated":{"line":68,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":23}},{"name":"chai","generated":{"line":68,"column":27},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":27}},{"generated":{"line":68,"column":31},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":31}},{"name":"Assertion","generated":{"line":68,"column":32},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":32}},{"generated":{"line":68,"column":41},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":23}},{"generated":{"line":68,"column":43},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":65,"column":4}},{"name":"transferFlags","generated":{"line":69,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":4}},{"name":"transferFlags","generated":{"line":69,"column":4},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":4}},{"generated":{"line":69,"column":17},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":17}},{"generated":{"line":69,"column":18},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":18}},{"generated":{"line":69,"column":22},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":17}},{"name":"newAssertion","generated":{"line":69,"column":24},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":24}},{"generated":{"line":69,"column":36},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":17}},{"generated":{"line":69,"column":37},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":66,"column":4}},{"generated":{"line":70,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":67,"column":4}},{"name":"newAssertion","generated":{"line":70,"column":11},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":67,"column":11}},{"generated":{"line":70,"column":23},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":67,"column":4}},{"generated":{"line":71,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":68,"column":3}},{"generated":{"line":71,"column":3},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":59,"column":2}},{"generated":{"line":72,"column":0},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":69,"column":1}},{"generated":{"line":72,"column":1},"source":"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js","original":{"line":43,"column":0}}],"sources":{"node_modules/chai/lib/chai/utils/overwriteChainableMethod.js":"/*!\n * Chai - overwriteChainableMethod utility\n * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\n\nvar chai = require('../../chai');\nvar transferFlags = require('./transferFlags');\n\n/**\n * ### .overwriteChainableMethod(ctx, name, method, chainingBehavior)\n *\n * Overwrites an already existing chainable method\n * and provides access to the previous function or\n * property. Must return functions to be used for\n * name.\n *\n * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf',\n * function (_super) {\n * }\n * , function (_super) {\n * }\n * );\n *\n * Can also be accessed directly from `chai.Assertion`.\n *\n * chai.Assertion.overwriteChainableMethod('foo', fn, fn);\n *\n * Then can be used as any other assertion.\n *\n * expect(myFoo).to.have.lengthOf(3);\n * expect(myFoo).to.have.lengthOf.above(3);\n *\n * @param {Object} ctx object whose method / property is to be overwritten\n * @param {String} name of method / property to overwrite\n * @param {Function} method function that returns a function to be used for name\n * @param {Function} chainingBehavior function that returns a function to be used for property\n * @namespace Utils\n * @name overwriteChainableMethod\n * @api public\n */\n\nmodule.exports = function overwriteChainableMethod(ctx, name, method, chainingBehavior) {\n var chainableBehavior = ctx.__methods[name];\n\n var _chainingBehavior = chainableBehavior.chainingBehavior;\n chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() {\n var result = chainingBehavior(_chainingBehavior).call(this);\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n\n var _method = chainableBehavior.method;\n chainableBehavior.method = function overwritingChainableMethodWrapper() {\n var result = method(_method).apply(this, arguments);\n if (result !== undefined) {\n return result;\n }\n\n var newAssertion = new chai.Assertion();\n transferFlags(this, newAssertion);\n return newAssertion;\n };\n};\n"},"lineCount":null}},"hash":"66630451ae95042307b08d4b90e20f37","cacheData":{"env":{}}} |