1 line
80 KiB
JSON
1 line
80 KiB
JSON
{"id":"node_modules/chai-as-promised/lib/chai-as-promised.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-as-promised/package.json","includedInParent":true,"mtime":1542058764035},{"name":"check-error","loc":{"line":3,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai-as-promised/lib/chai-as-promised.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/check-error/index.js"}],"generated":{"js":"\"use strict\";\n/* eslint-disable no-invalid-this */\nlet checkError = require(\"check-error\");\n\nmodule.exports = (chai, utils) => {\n const Assertion = chai.Assertion;\n const assert = chai.assert;\n const proxify = utils.proxify;\n\n // If we are using a version of Chai that has checkError on it,\n // we want to use that version to be consistent. Otherwise, we use\n // what was passed to the factory.\n if (utils.checkError) {\n checkError = utils.checkError;\n }\n\n function isLegacyJQueryPromise(thenable) {\n // jQuery promises are Promises/A+-compatible since 3.0.0. jQuery 3.0.0 is also the first version\n // to define the catch method.\n return typeof thenable.catch !== \"function\" &&\n typeof thenable.always === \"function\" &&\n typeof thenable.done === \"function\" &&\n typeof thenable.fail === \"function\" &&\n typeof thenable.pipe === \"function\" &&\n typeof thenable.progress === \"function\" &&\n typeof thenable.state === \"function\";\n }\n\n function assertIsAboutPromise(assertion) {\n if (typeof assertion._obj.then !== \"function\") {\n throw new TypeError(utils.inspect(assertion._obj) + \" is not a thenable.\");\n }\n if (isLegacyJQueryPromise(assertion._obj)) {\n throw new TypeError(\"Chai as Promised is incompatible with thenables of jQuery<3.0.0, sorry! Please \" +\n \"upgrade jQuery or use another Promises/A+ compatible library (see \" +\n \"http://promisesaplus.com/).\");\n }\n }\n\n function proxifyIfSupported(assertion) {\n return proxify === undefined ? assertion : proxify(assertion);\n }\n\n function method(name, asserter) {\n utils.addMethod(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return asserter.apply(this, arguments);\n });\n }\n\n function property(name, asserter) {\n utils.addProperty(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return proxifyIfSupported(asserter.apply(this, arguments));\n });\n }\n\n function doNotify(promise, done) {\n promise.then(() => done(), done);\n }\n\n // These are for clarity and to bypass Chai refusing to allow `undefined` as actual when used with `assert`.\n function assertIfNegated(assertion, message, extra) {\n assertion.assert(true, null, message, extra.expected, extra.actual);\n }\n\n function assertIfNotNegated(assertion, message, extra) {\n assertion.assert(false, message, null, extra.expected, extra.actual);\n }\n\n function getBasePromise(assertion) {\n // We need to chain subsequent asserters on top of ones in the chain already (consider\n // `eventually.have.property(\"foo\").that.equals(\"bar\")`), only running them after the existing ones pass.\n // So the first base-promise is `assertion._obj`, but after that we use the assertions themselves, i.e.\n // previously derived promises, to chain off of.\n return typeof assertion.then === \"function\" ? assertion : assertion._obj;\n }\n\n function getReasonName(reason) {\n return reason instanceof Error ? reason.toString() : checkError.getConstructorName(reason);\n }\n\n // Grab these first, before we modify `Assertion.prototype`.\n\n const propertyNames = Object.getOwnPropertyNames(Assertion.prototype);\n\n const propertyDescs = {};\n for (const name of propertyNames) {\n propertyDescs[name] = Object.getOwnPropertyDescriptor(Assertion.prototype, name);\n }\n\n property(\"fulfilled\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNegated(this,\n \"expected promise not to be fulfilled but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNotNegated(this,\n \"expected promise to be fulfilled but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"rejected\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNotNegated(this,\n \"expected promise to be rejected but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNegated(this,\n \"expected promise not to be rejected but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n\n // Return the reason, transforming this into a fulfillment, to allow further assertions, e.g.\n // `promise.should.be.rejected.and.eventually.equal(\"reason\")`.\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n method(\"rejectedWith\", function (errorLike, errMsgMatcher, message) {\n let errorLikeName = null;\n const negate = utils.flag(this, \"negate\") || false;\n\n // rejectedWith with that is called without arguments is\n // the same as a plain \".rejected\" use.\n if (errorLike === undefined && errMsgMatcher === undefined &&\n message === undefined) {\n /* eslint-disable no-unused-expressions */\n return this.rejected;\n /* eslint-enable no-unused-expressions */\n }\n\n if (message !== undefined) {\n utils.flag(this, \"message\", message);\n }\n\n if (errorLike instanceof RegExp || typeof errorLike === \"string\") {\n errMsgMatcher = errorLike;\n errorLike = null;\n } else if (errorLike && errorLike instanceof Error) {\n errorLikeName = errorLike.toString();\n } else if (typeof errorLike === \"function\") {\n errorLikeName = checkError.getConstructorName(errorLike);\n } else {\n errorLike = null;\n }\n const everyArgIsDefined = Boolean(errorLike && errMsgMatcher);\n\n let matcherRelation = \"including\";\n if (errMsgMatcher instanceof RegExp) {\n matcherRelation = \"matching\";\n }\n\n const derivedPromise = getBasePromise(this).then(\n value => {\n let assertionMessage = null;\n let expected = null;\n\n if (errorLike) {\n assertionMessage = \"expected promise to be rejected with #{exp} but it was fulfilled with #{act}\";\n expected = errorLikeName;\n } else if (errMsgMatcher) {\n assertionMessage = `expected promise to be rejected with an error ${matcherRelation} #{exp} but ` +\n `it was fulfilled with #{act}`;\n expected = errMsgMatcher;\n }\n\n assertIfNotNegated(this, assertionMessage, { expected, actual: value });\n return value;\n },\n reason => {\n const errorLikeCompatible = errorLike && (errorLike instanceof Error ?\n checkError.compatibleInstance(reason, errorLike) :\n checkError.compatibleConstructor(reason, errorLike));\n\n const errMsgMatcherCompatible = errMsgMatcher && checkError.compatibleMessage(reason, errMsgMatcher);\n\n const reasonName = getReasonName(reason);\n\n if (negate && everyArgIsDefined) {\n if (errorLikeCompatible && errMsgMatcherCompatible) {\n this.assert(true,\n null,\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n } else {\n if (errorLike) {\n this.assert(errorLikeCompatible,\n \"expected promise to be rejected with #{exp} but it was rejected with #{act}\",\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n\n if (errMsgMatcher) {\n this.assert(errMsgMatcherCompatible,\n `expected promise to be rejected with an error ${matcherRelation} #{exp} but got ` +\n `#{act}`,\n `expected promise not to be rejected with an error ${matcherRelation} #{exp}`,\n errMsgMatcher,\n checkError.getMessage(reason));\n }\n }\n\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"eventually\", function () {\n utils.flag(this, \"eventually\", true);\n return this;\n });\n\n method(\"notify\", function (done) {\n doNotify(getBasePromise(this), done);\n return this;\n });\n\n method(\"become\", function (value, message) {\n return this.eventually.deep.equal(value, message);\n });\n\n // ### `eventually`\n\n // We need to be careful not to trigger any getters, thus `Object.getOwnPropertyDescriptor` usage.\n const methodNames = propertyNames.filter(name => {\n return name !== \"assert\" && typeof propertyDescs[name].value === \"function\";\n });\n\n methodNames.forEach(methodName => {\n Assertion.overwriteMethod(methodName, originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n });\n });\n\n const getterNames = propertyNames.filter(name => {\n return name !== \"_obj\" && typeof propertyDescs[name].get === \"function\";\n });\n\n getterNames.forEach(getterName => {\n // Chainable methods are things like `an`, which can work both for `.should.be.an.instanceOf` and as\n // `should.be.an(\"object\")`. We need to handle those specially.\n const isChainableMethod = Assertion.prototype.__methods.hasOwnProperty(getterName);\n\n if (isChainableMethod) {\n Assertion.overwriteChainableMethod(\n getterName,\n originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n },\n originalGetter => function () {\n return doAsserterAsyncAndAddThen(originalGetter, this);\n }\n );\n } else {\n Assertion.overwriteProperty(getterName, originalGetter => function () {\n return proxifyIfSupported(doAsserterAsyncAndAddThen(originalGetter, this));\n });\n }\n });\n\n function doAsserterAsyncAndAddThen(asserter, assertion, args) {\n // Since we're intercepting all methods/properties, we need to just pass through if they don't want\n // `eventually`, or if we've already fulfilled the promise (see below).\n if (!utils.flag(assertion, \"eventually\")) {\n asserter.apply(assertion, args);\n return assertion;\n }\n\n const derivedPromise = getBasePromise(assertion).then(value => {\n // Set up the environment for the asserter to actually run: `_obj` should be the fulfillment value, and\n // now that we have the value, we're no longer in \"eventually\" mode, so we won't run any of this code,\n // just the base Chai code that we get to via the short-circuit above.\n assertion._obj = value;\n utils.flag(assertion, \"eventually\", false);\n\n return args ? module.exports.transformAsserterArgs(args) : args;\n }).then(newArgs => {\n asserter.apply(assertion, newArgs);\n\n // Because asserters, for example `property`, can change the value of `_obj` (i.e. change the \"object\"\n // flag), we need to communicate this value change to subsequent chained asserters. Since we build a\n // promise chain paralleling the asserter chain, we can use it to communicate such changes.\n return assertion._obj;\n });\n\n module.exports.transferPromiseness(assertion, derivedPromise);\n return assertion;\n }\n\n // ### Now use the `Assertion` framework to build an `assert` interface.\n const originalAssertMethods = Object.getOwnPropertyNames(assert).filter(propName => {\n return typeof assert[propName] === \"function\";\n });\n\n assert.isFulfilled = (promise, message) => (new Assertion(promise, message)).to.be.fulfilled;\n\n assert.isRejected = (promise, errorLike, errMsgMatcher, message) => {\n const assertion = new Assertion(promise, message);\n return assertion.to.be.rejectedWith(errorLike, errMsgMatcher, message);\n };\n\n assert.becomes = (promise, value, message) => assert.eventually.deepEqual(promise, value, message);\n\n assert.doesNotBecome = (promise, value, message) => assert.eventually.notDeepEqual(promise, value, message);\n\n assert.eventually = {};\n originalAssertMethods.forEach(assertMethodName => {\n assert.eventually[assertMethodName] = function (promise) {\n const otherArgs = Array.prototype.slice.call(arguments, 1);\n\n let customRejectionHandler;\n const message = arguments[assert[assertMethodName].length - 1];\n if (typeof message === \"string\") {\n customRejectionHandler = reason => {\n throw new chai.AssertionError(`${message}\\n\\nOriginal reason: ${utils.inspect(reason)}`);\n };\n }\n\n const returnedPromise = promise.then(\n fulfillmentValue => assert[assertMethodName].apply(assert, [fulfillmentValue].concat(otherArgs)),\n customRejectionHandler\n );\n\n returnedPromise.notify = done => {\n doNotify(returnedPromise, done);\n };\n\n return returnedPromise;\n };\n });\n};\n\nmodule.exports.transferPromiseness = (assertion, promise) => {\n assertion.then = promise.then.bind(promise);\n};\n\nmodule.exports.transformAsserterArgs = values => values;\n","map":{"mappings":[{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":6,"column":0},"generated":{"line":6,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":7,"column":0},"generated":{"line":7,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":8,"column":0},"generated":{"line":8,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":9,"column":0},"generated":{"line":9,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":10,"column":0},"generated":{"line":10,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":11,"column":0},"generated":{"line":11,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":12,"column":0},"generated":{"line":12,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":13,"column":0},"generated":{"line":13,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":14,"column":0},"generated":{"line":14,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":15,"column":0},"generated":{"line":15,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":16,"column":0},"generated":{"line":16,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":17,"column":0},"generated":{"line":17,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":18,"column":0},"generated":{"line":18,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":19,"column":0},"generated":{"line":19,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":20,"column":0},"generated":{"line":20,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":21,"column":0},"generated":{"line":21,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":22,"column":0},"generated":{"line":22,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":23,"column":0},"generated":{"line":23,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":24,"column":0},"generated":{"line":24,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":25,"column":0},"generated":{"line":25,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":26,"column":0},"generated":{"line":26,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":27,"column":0},"generated":{"line":27,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":28,"column":0},"generated":{"line":28,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":29,"column":0},"generated":{"line":29,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":30,"column":0},"generated":{"line":30,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":31,"column":0},"generated":{"line":31,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":32,"column":0},"generated":{"line":32,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":33,"column":0},"generated":{"line":33,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":34,"column":0},"generated":{"line":34,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":35,"column":0},"generated":{"line":35,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":36,"column":0},"generated":{"line":36,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":37,"column":0},"generated":{"line":37,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":38,"column":0},"generated":{"line":38,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":39,"column":0},"generated":{"line":39,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":40,"column":0},"generated":{"line":40,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":41,"column":0},"generated":{"line":41,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":42,"column":0},"generated":{"line":42,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":43,"column":0},"generated":{"line":43,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":44,"column":0},"generated":{"line":44,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":45,"column":0},"generated":{"line":45,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":46,"column":0},"generated":{"line":46,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":47,"column":0},"generated":{"line":47,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":48,"column":0},"generated":{"line":48,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":49,"column":0},"generated":{"line":49,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":50,"column":0},"generated":{"line":50,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":51,"column":0},"generated":{"line":51,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":52,"column":0},"generated":{"line":52,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":53,"column":0},"generated":{"line":53,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":54,"column":0},"generated":{"line":54,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":55,"column":0},"generated":{"line":55,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":56,"column":0},"generated":{"line":56,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":57,"column":0},"generated":{"line":57,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":58,"column":0},"generated":{"line":58,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":59,"column":0},"generated":{"line":59,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":60,"column":0},"generated":{"line":60,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":61,"column":0},"generated":{"line":61,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":62,"column":0},"generated":{"line":62,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":63,"column":0},"generated":{"line":63,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":64,"column":0},"generated":{"line":64,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":65,"column":0},"generated":{"line":65,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":66,"column":0},"generated":{"line":66,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":67,"column":0},"generated":{"line":67,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":68,"column":0},"generated":{"line":68,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":69,"column":0},"generated":{"line":69,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":70,"column":0},"generated":{"line":70,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":71,"column":0},"generated":{"line":71,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":72,"column":0},"generated":{"line":72,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":73,"column":0},"generated":{"line":73,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":74,"column":0},"generated":{"line":74,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":75,"column":0},"generated":{"line":75,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":76,"column":0},"generated":{"line":76,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":77,"column":0},"generated":{"line":77,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":78,"column":0},"generated":{"line":78,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":79,"column":0},"generated":{"line":79,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":80,"column":0},"generated":{"line":80,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":81,"column":0},"generated":{"line":81,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":82,"column":0},"generated":{"line":82,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":83,"column":0},"generated":{"line":83,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":84,"column":0},"generated":{"line":84,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":85,"column":0},"generated":{"line":85,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":86,"column":0},"generated":{"line":86,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":87,"column":0},"generated":{"line":87,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":88,"column":0},"generated":{"line":88,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":89,"column":0},"generated":{"line":89,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":90,"column":0},"generated":{"line":90,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":91,"column":0},"generated":{"line":91,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":92,"column":0},"generated":{"line":92,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":93,"column":0},"generated":{"line":93,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":94,"column":0},"generated":{"line":94,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":95,"column":0},"generated":{"line":95,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":96,"column":0},"generated":{"line":96,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":97,"column":0},"generated":{"line":97,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":98,"column":0},"generated":{"line":98,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":99,"column":0},"generated":{"line":99,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":100,"column":0},"generated":{"line":100,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":101,"column":0},"generated":{"line":101,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":102,"column":0},"generated":{"line":102,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":103,"column":0},"generated":{"line":103,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":104,"column":0},"generated":{"line":104,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":105,"column":0},"generated":{"line":105,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":106,"column":0},"generated":{"line":106,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":107,"column":0},"generated":{"line":107,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":108,"column":0},"generated":{"line":108,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":109,"column":0},"generated":{"line":109,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":110,"column":0},"generated":{"line":110,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":111,"column":0},"generated":{"line":111,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":112,"column":0},"generated":{"line":112,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":113,"column":0},"generated":{"line":113,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":114,"column":0},"generated":{"line":114,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":115,"column":0},"generated":{"line":115,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":116,"column":0},"generated":{"line":116,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":117,"column":0},"generated":{"line":117,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":118,"column":0},"generated":{"line":118,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":119,"column":0},"generated":{"line":119,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":120,"column":0},"generated":{"line":120,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":121,"column":0},"generated":{"line":121,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":122,"column":0},"generated":{"line":122,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":123,"column":0},"generated":{"line":123,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":124,"column":0},"generated":{"line":124,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":125,"column":0},"generated":{"line":125,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":126,"column":0},"generated":{"line":126,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":127,"column":0},"generated":{"line":127,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":128,"column":0},"generated":{"line":128,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":129,"column":0},"generated":{"line":129,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":130,"column":0},"generated":{"line":130,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":131,"column":0},"generated":{"line":131,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":132,"column":0},"generated":{"line":132,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":133,"column":0},"generated":{"line":133,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":134,"column":0},"generated":{"line":134,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":135,"column":0},"generated":{"line":135,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":136,"column":0},"generated":{"line":136,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":137,"column":0},"generated":{"line":137,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":138,"column":0},"generated":{"line":138,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":139,"column":0},"generated":{"line":139,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":140,"column":0},"generated":{"line":140,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":141,"column":0},"generated":{"line":141,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":142,"column":0},"generated":{"line":142,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":143,"column":0},"generated":{"line":143,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":144,"column":0},"generated":{"line":144,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":145,"column":0},"generated":{"line":145,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":146,"column":0},"generated":{"line":146,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":147,"column":0},"generated":{"line":147,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":148,"column":0},"generated":{"line":148,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":149,"column":0},"generated":{"line":149,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":150,"column":0},"generated":{"line":150,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":151,"column":0},"generated":{"line":151,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":152,"column":0},"generated":{"line":152,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":153,"column":0},"generated":{"line":153,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":154,"column":0},"generated":{"line":154,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":155,"column":0},"generated":{"line":155,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":156,"column":0},"generated":{"line":156,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":157,"column":0},"generated":{"line":157,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":158,"column":0},"generated":{"line":158,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":159,"column":0},"generated":{"line":159,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":160,"column":0},"generated":{"line":160,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":161,"column":0},"generated":{"line":161,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":162,"column":0},"generated":{"line":162,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":163,"column":0},"generated":{"line":163,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":164,"column":0},"generated":{"line":164,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":165,"column":0},"generated":{"line":165,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":166,"column":0},"generated":{"line":166,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":167,"column":0},"generated":{"line":167,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":168,"column":0},"generated":{"line":168,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":169,"column":0},"generated":{"line":169,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":170,"column":0},"generated":{"line":170,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":171,"column":0},"generated":{"line":171,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":172,"column":0},"generated":{"line":172,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":173,"column":0},"generated":{"line":173,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":174,"column":0},"generated":{"line":174,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":175,"column":0},"generated":{"line":175,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":176,"column":0},"generated":{"line":176,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":177,"column":0},"generated":{"line":177,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":178,"column":0},"generated":{"line":178,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":179,"column":0},"generated":{"line":179,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":180,"column":0},"generated":{"line":180,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":181,"column":0},"generated":{"line":181,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":182,"column":0},"generated":{"line":182,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":183,"column":0},"generated":{"line":183,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":184,"column":0},"generated":{"line":184,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":185,"column":0},"generated":{"line":185,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":186,"column":0},"generated":{"line":186,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":187,"column":0},"generated":{"line":187,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":188,"column":0},"generated":{"line":188,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":189,"column":0},"generated":{"line":189,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":190,"column":0},"generated":{"line":190,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":191,"column":0},"generated":{"line":191,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":192,"column":0},"generated":{"line":192,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":193,"column":0},"generated":{"line":193,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":194,"column":0},"generated":{"line":194,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":195,"column":0},"generated":{"line":195,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":196,"column":0},"generated":{"line":196,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":197,"column":0},"generated":{"line":197,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":198,"column":0},"generated":{"line":198,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":199,"column":0},"generated":{"line":199,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":200,"column":0},"generated":{"line":200,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":201,"column":0},"generated":{"line":201,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":202,"column":0},"generated":{"line":202,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":203,"column":0},"generated":{"line":203,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":204,"column":0},"generated":{"line":204,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":205,"column":0},"generated":{"line":205,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":206,"column":0},"generated":{"line":206,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":207,"column":0},"generated":{"line":207,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":208,"column":0},"generated":{"line":208,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":209,"column":0},"generated":{"line":209,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":210,"column":0},"generated":{"line":210,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":211,"column":0},"generated":{"line":211,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":212,"column":0},"generated":{"line":212,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":213,"column":0},"generated":{"line":213,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":214,"column":0},"generated":{"line":214,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":215,"column":0},"generated":{"line":215,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":216,"column":0},"generated":{"line":216,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":217,"column":0},"generated":{"line":217,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":218,"column":0},"generated":{"line":218,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":219,"column":0},"generated":{"line":219,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":220,"column":0},"generated":{"line":220,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":221,"column":0},"generated":{"line":221,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":222,"column":0},"generated":{"line":222,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":223,"column":0},"generated":{"line":223,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":224,"column":0},"generated":{"line":224,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":225,"column":0},"generated":{"line":225,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":226,"column":0},"generated":{"line":226,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":227,"column":0},"generated":{"line":227,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":228,"column":0},"generated":{"line":228,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":229,"column":0},"generated":{"line":229,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":230,"column":0},"generated":{"line":230,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":231,"column":0},"generated":{"line":231,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":232,"column":0},"generated":{"line":232,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":233,"column":0},"generated":{"line":233,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":234,"column":0},"generated":{"line":234,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":235,"column":0},"generated":{"line":235,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":236,"column":0},"generated":{"line":236,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":237,"column":0},"generated":{"line":237,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":238,"column":0},"generated":{"line":238,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":239,"column":0},"generated":{"line":239,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":240,"column":0},"generated":{"line":240,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":241,"column":0},"generated":{"line":241,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":242,"column":0},"generated":{"line":242,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":243,"column":0},"generated":{"line":243,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":244,"column":0},"generated":{"line":244,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":245,"column":0},"generated":{"line":245,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":246,"column":0},"generated":{"line":246,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":247,"column":0},"generated":{"line":247,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":248,"column":0},"generated":{"line":248,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":249,"column":0},"generated":{"line":249,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":250,"column":0},"generated":{"line":250,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":251,"column":0},"generated":{"line":251,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":252,"column":0},"generated":{"line":252,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":253,"column":0},"generated":{"line":253,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":254,"column":0},"generated":{"line":254,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":255,"column":0},"generated":{"line":255,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":256,"column":0},"generated":{"line":256,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":257,"column":0},"generated":{"line":257,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":258,"column":0},"generated":{"line":258,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":259,"column":0},"generated":{"line":259,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":260,"column":0},"generated":{"line":260,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":261,"column":0},"generated":{"line":261,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":262,"column":0},"generated":{"line":262,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":263,"column":0},"generated":{"line":263,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":264,"column":0},"generated":{"line":264,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":265,"column":0},"generated":{"line":265,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":266,"column":0},"generated":{"line":266,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":267,"column":0},"generated":{"line":267,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":268,"column":0},"generated":{"line":268,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":269,"column":0},"generated":{"line":269,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":270,"column":0},"generated":{"line":270,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":271,"column":0},"generated":{"line":271,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":272,"column":0},"generated":{"line":272,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":273,"column":0},"generated":{"line":273,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":274,"column":0},"generated":{"line":274,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":275,"column":0},"generated":{"line":275,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":276,"column":0},"generated":{"line":276,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":277,"column":0},"generated":{"line":277,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":278,"column":0},"generated":{"line":278,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":279,"column":0},"generated":{"line":279,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":280,"column":0},"generated":{"line":280,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":281,"column":0},"generated":{"line":281,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":282,"column":0},"generated":{"line":282,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":283,"column":0},"generated":{"line":283,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":284,"column":0},"generated":{"line":284,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":285,"column":0},"generated":{"line":285,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":286,"column":0},"generated":{"line":286,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":287,"column":0},"generated":{"line":287,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":288,"column":0},"generated":{"line":288,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":289,"column":0},"generated":{"line":289,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":290,"column":0},"generated":{"line":290,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":291,"column":0},"generated":{"line":291,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":292,"column":0},"generated":{"line":292,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":293,"column":0},"generated":{"line":293,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":294,"column":0},"generated":{"line":294,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":295,"column":0},"generated":{"line":295,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":296,"column":0},"generated":{"line":296,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":297,"column":0},"generated":{"line":297,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":298,"column":0},"generated":{"line":298,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":299,"column":0},"generated":{"line":299,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":300,"column":0},"generated":{"line":300,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":301,"column":0},"generated":{"line":301,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":302,"column":0},"generated":{"line":302,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":303,"column":0},"generated":{"line":303,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":304,"column":0},"generated":{"line":304,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":305,"column":0},"generated":{"line":305,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":306,"column":0},"generated":{"line":306,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":307,"column":0},"generated":{"line":307,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":308,"column":0},"generated":{"line":308,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":309,"column":0},"generated":{"line":309,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":310,"column":0},"generated":{"line":310,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":311,"column":0},"generated":{"line":311,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":312,"column":0},"generated":{"line":312,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":313,"column":0},"generated":{"line":313,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":314,"column":0},"generated":{"line":314,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":315,"column":0},"generated":{"line":315,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":316,"column":0},"generated":{"line":316,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":317,"column":0},"generated":{"line":317,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":318,"column":0},"generated":{"line":318,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":319,"column":0},"generated":{"line":319,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":320,"column":0},"generated":{"line":320,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":321,"column":0},"generated":{"line":321,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":322,"column":0},"generated":{"line":322,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":323,"column":0},"generated":{"line":323,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":324,"column":0},"generated":{"line":324,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":325,"column":0},"generated":{"line":325,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":326,"column":0},"generated":{"line":326,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":327,"column":0},"generated":{"line":327,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":328,"column":0},"generated":{"line":328,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":329,"column":0},"generated":{"line":329,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":330,"column":0},"generated":{"line":330,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":331,"column":0},"generated":{"line":331,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":332,"column":0},"generated":{"line":332,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":333,"column":0},"generated":{"line":333,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":334,"column":0},"generated":{"line":334,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":335,"column":0},"generated":{"line":335,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":336,"column":0},"generated":{"line":336,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":337,"column":0},"generated":{"line":337,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":338,"column":0},"generated":{"line":338,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":339,"column":0},"generated":{"line":339,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":340,"column":0},"generated":{"line":340,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":341,"column":0},"generated":{"line":341,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":342,"column":0},"generated":{"line":342,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":343,"column":0},"generated":{"line":343,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":344,"column":0},"generated":{"line":344,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":345,"column":0},"generated":{"line":345,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":346,"column":0},"generated":{"line":346,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":347,"column":0},"generated":{"line":347,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":348,"column":0},"generated":{"line":348,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":349,"column":0},"generated":{"line":349,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":350,"column":0},"generated":{"line":350,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":351,"column":0},"generated":{"line":351,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":352,"column":0},"generated":{"line":352,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":353,"column":0},"generated":{"line":353,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":354,"column":0},"generated":{"line":354,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":355,"column":0},"generated":{"line":355,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":356,"column":0},"generated":{"line":356,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":357,"column":0},"generated":{"line":357,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":358,"column":0},"generated":{"line":358,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":359,"column":0},"generated":{"line":359,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":360,"column":0},"generated":{"line":360,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":361,"column":0},"generated":{"line":361,"column":0}},{"source":"node_modules/chai-as-promised/lib/chai-as-promised.js","original":{"line":362,"column":0},"generated":{"line":362,"column":0}}],"sources":{"node_modules/chai-as-promised/lib/chai-as-promised.js":"\"use strict\";\n/* eslint-disable no-invalid-this */\nlet checkError = require(\"check-error\");\n\nmodule.exports = (chai, utils) => {\n const Assertion = chai.Assertion;\n const assert = chai.assert;\n const proxify = utils.proxify;\n\n // If we are using a version of Chai that has checkError on it,\n // we want to use that version to be consistent. Otherwise, we use\n // what was passed to the factory.\n if (utils.checkError) {\n checkError = utils.checkError;\n }\n\n function isLegacyJQueryPromise(thenable) {\n // jQuery promises are Promises/A+-compatible since 3.0.0. jQuery 3.0.0 is also the first version\n // to define the catch method.\n return typeof thenable.catch !== \"function\" &&\n typeof thenable.always === \"function\" &&\n typeof thenable.done === \"function\" &&\n typeof thenable.fail === \"function\" &&\n typeof thenable.pipe === \"function\" &&\n typeof thenable.progress === \"function\" &&\n typeof thenable.state === \"function\";\n }\n\n function assertIsAboutPromise(assertion) {\n if (typeof assertion._obj.then !== \"function\") {\n throw new TypeError(utils.inspect(assertion._obj) + \" is not a thenable.\");\n }\n if (isLegacyJQueryPromise(assertion._obj)) {\n throw new TypeError(\"Chai as Promised is incompatible with thenables of jQuery<3.0.0, sorry! Please \" +\n \"upgrade jQuery or use another Promises/A+ compatible library (see \" +\n \"http://promisesaplus.com/).\");\n }\n }\n\n function proxifyIfSupported(assertion) {\n return proxify === undefined ? assertion : proxify(assertion);\n }\n\n function method(name, asserter) {\n utils.addMethod(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return asserter.apply(this, arguments);\n });\n }\n\n function property(name, asserter) {\n utils.addProperty(Assertion.prototype, name, function () {\n assertIsAboutPromise(this);\n return proxifyIfSupported(asserter.apply(this, arguments));\n });\n }\n\n function doNotify(promise, done) {\n promise.then(() => done(), done);\n }\n\n // These are for clarity and to bypass Chai refusing to allow `undefined` as actual when used with `assert`.\n function assertIfNegated(assertion, message, extra) {\n assertion.assert(true, null, message, extra.expected, extra.actual);\n }\n\n function assertIfNotNegated(assertion, message, extra) {\n assertion.assert(false, message, null, extra.expected, extra.actual);\n }\n\n function getBasePromise(assertion) {\n // We need to chain subsequent asserters on top of ones in the chain already (consider\n // `eventually.have.property(\"foo\").that.equals(\"bar\")`), only running them after the existing ones pass.\n // So the first base-promise is `assertion._obj`, but after that we use the assertions themselves, i.e.\n // previously derived promises, to chain off of.\n return typeof assertion.then === \"function\" ? assertion : assertion._obj;\n }\n\n function getReasonName(reason) {\n return reason instanceof Error ? reason.toString() : checkError.getConstructorName(reason);\n }\n\n // Grab these first, before we modify `Assertion.prototype`.\n\n const propertyNames = Object.getOwnPropertyNames(Assertion.prototype);\n\n const propertyDescs = {};\n for (const name of propertyNames) {\n propertyDescs[name] = Object.getOwnPropertyDescriptor(Assertion.prototype, name);\n }\n\n property(\"fulfilled\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNegated(this,\n \"expected promise not to be fulfilled but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNotNegated(this,\n \"expected promise to be fulfilled but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"rejected\", function () {\n const derivedPromise = getBasePromise(this).then(\n value => {\n assertIfNotNegated(this,\n \"expected promise to be rejected but it was fulfilled with #{act}\",\n { actual: value });\n return value;\n },\n reason => {\n assertIfNegated(this,\n \"expected promise not to be rejected but it was rejected with #{act}\",\n { actual: getReasonName(reason) });\n\n // Return the reason, transforming this into a fulfillment, to allow further assertions, e.g.\n // `promise.should.be.rejected.and.eventually.equal(\"reason\")`.\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n method(\"rejectedWith\", function (errorLike, errMsgMatcher, message) {\n let errorLikeName = null;\n const negate = utils.flag(this, \"negate\") || false;\n\n // rejectedWith with that is called without arguments is\n // the same as a plain \".rejected\" use.\n if (errorLike === undefined && errMsgMatcher === undefined &&\n message === undefined) {\n /* eslint-disable no-unused-expressions */\n return this.rejected;\n /* eslint-enable no-unused-expressions */\n }\n\n if (message !== undefined) {\n utils.flag(this, \"message\", message);\n }\n\n if (errorLike instanceof RegExp || typeof errorLike === \"string\") {\n errMsgMatcher = errorLike;\n errorLike = null;\n } else if (errorLike && errorLike instanceof Error) {\n errorLikeName = errorLike.toString();\n } else if (typeof errorLike === \"function\") {\n errorLikeName = checkError.getConstructorName(errorLike);\n } else {\n errorLike = null;\n }\n const everyArgIsDefined = Boolean(errorLike && errMsgMatcher);\n\n let matcherRelation = \"including\";\n if (errMsgMatcher instanceof RegExp) {\n matcherRelation = \"matching\";\n }\n\n const derivedPromise = getBasePromise(this).then(\n value => {\n let assertionMessage = null;\n let expected = null;\n\n if (errorLike) {\n assertionMessage = \"expected promise to be rejected with #{exp} but it was fulfilled with #{act}\";\n expected = errorLikeName;\n } else if (errMsgMatcher) {\n assertionMessage = `expected promise to be rejected with an error ${matcherRelation} #{exp} but ` +\n `it was fulfilled with #{act}`;\n expected = errMsgMatcher;\n }\n\n assertIfNotNegated(this, assertionMessage, { expected, actual: value });\n return value;\n },\n reason => {\n const errorLikeCompatible = errorLike && (errorLike instanceof Error ?\n checkError.compatibleInstance(reason, errorLike) :\n checkError.compatibleConstructor(reason, errorLike));\n\n const errMsgMatcherCompatible = errMsgMatcher && checkError.compatibleMessage(reason, errMsgMatcher);\n\n const reasonName = getReasonName(reason);\n\n if (negate && everyArgIsDefined) {\n if (errorLikeCompatible && errMsgMatcherCompatible) {\n this.assert(true,\n null,\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n } else {\n if (errorLike) {\n this.assert(errorLikeCompatible,\n \"expected promise to be rejected with #{exp} but it was rejected with #{act}\",\n \"expected promise not to be rejected with #{exp} but it was rejected \" +\n \"with #{act}\",\n errorLikeName,\n reasonName);\n }\n\n if (errMsgMatcher) {\n this.assert(errMsgMatcherCompatible,\n `expected promise to be rejected with an error ${matcherRelation} #{exp} but got ` +\n `#{act}`,\n `expected promise not to be rejected with an error ${matcherRelation} #{exp}`,\n errMsgMatcher,\n checkError.getMessage(reason));\n }\n }\n\n return reason;\n }\n );\n\n module.exports.transferPromiseness(this, derivedPromise);\n return this;\n });\n\n property(\"eventually\", function () {\n utils.flag(this, \"eventually\", true);\n return this;\n });\n\n method(\"notify\", function (done) {\n doNotify(getBasePromise(this), done);\n return this;\n });\n\n method(\"become\", function (value, message) {\n return this.eventually.deep.equal(value, message);\n });\n\n // ### `eventually`\n\n // We need to be careful not to trigger any getters, thus `Object.getOwnPropertyDescriptor` usage.\n const methodNames = propertyNames.filter(name => {\n return name !== \"assert\" && typeof propertyDescs[name].value === \"function\";\n });\n\n methodNames.forEach(methodName => {\n Assertion.overwriteMethod(methodName, originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n });\n });\n\n const getterNames = propertyNames.filter(name => {\n return name !== \"_obj\" && typeof propertyDescs[name].get === \"function\";\n });\n\n getterNames.forEach(getterName => {\n // Chainable methods are things like `an`, which can work both for `.should.be.an.instanceOf` and as\n // `should.be.an(\"object\")`. We need to handle those specially.\n const isChainableMethod = Assertion.prototype.__methods.hasOwnProperty(getterName);\n\n if (isChainableMethod) {\n Assertion.overwriteChainableMethod(\n getterName,\n originalMethod => function () {\n return doAsserterAsyncAndAddThen(originalMethod, this, arguments);\n },\n originalGetter => function () {\n return doAsserterAsyncAndAddThen(originalGetter, this);\n }\n );\n } else {\n Assertion.overwriteProperty(getterName, originalGetter => function () {\n return proxifyIfSupported(doAsserterAsyncAndAddThen(originalGetter, this));\n });\n }\n });\n\n function doAsserterAsyncAndAddThen(asserter, assertion, args) {\n // Since we're intercepting all methods/properties, we need to just pass through if they don't want\n // `eventually`, or if we've already fulfilled the promise (see below).\n if (!utils.flag(assertion, \"eventually\")) {\n asserter.apply(assertion, args);\n return assertion;\n }\n\n const derivedPromise = getBasePromise(assertion).then(value => {\n // Set up the environment for the asserter to actually run: `_obj` should be the fulfillment value, and\n // now that we have the value, we're no longer in \"eventually\" mode, so we won't run any of this code,\n // just the base Chai code that we get to via the short-circuit above.\n assertion._obj = value;\n utils.flag(assertion, \"eventually\", false);\n\n return args ? module.exports.transformAsserterArgs(args) : args;\n }).then(newArgs => {\n asserter.apply(assertion, newArgs);\n\n // Because asserters, for example `property`, can change the value of `_obj` (i.e. change the \"object\"\n // flag), we need to communicate this value change to subsequent chained asserters. Since we build a\n // promise chain paralleling the asserter chain, we can use it to communicate such changes.\n return assertion._obj;\n });\n\n module.exports.transferPromiseness(assertion, derivedPromise);\n return assertion;\n }\n\n // ### Now use the `Assertion` framework to build an `assert` interface.\n const originalAssertMethods = Object.getOwnPropertyNames(assert).filter(propName => {\n return typeof assert[propName] === \"function\";\n });\n\n assert.isFulfilled = (promise, message) => (new Assertion(promise, message)).to.be.fulfilled;\n\n assert.isRejected = (promise, errorLike, errMsgMatcher, message) => {\n const assertion = new Assertion(promise, message);\n return assertion.to.be.rejectedWith(errorLike, errMsgMatcher, message);\n };\n\n assert.becomes = (promise, value, message) => assert.eventually.deepEqual(promise, value, message);\n\n assert.doesNotBecome = (promise, value, message) => assert.eventually.notDeepEqual(promise, value, message);\n\n assert.eventually = {};\n originalAssertMethods.forEach(assertMethodName => {\n assert.eventually[assertMethodName] = function (promise) {\n const otherArgs = Array.prototype.slice.call(arguments, 1);\n\n let customRejectionHandler;\n const message = arguments[assert[assertMethodName].length - 1];\n if (typeof message === \"string\") {\n customRejectionHandler = reason => {\n throw new chai.AssertionError(`${message}\\n\\nOriginal reason: ${utils.inspect(reason)}`);\n };\n }\n\n const returnedPromise = promise.then(\n fulfillmentValue => assert[assertMethodName].apply(assert, [fulfillmentValue].concat(otherArgs)),\n customRejectionHandler\n );\n\n returnedPromise.notify = done => {\n doNotify(returnedPromise, done);\n };\n\n return returnedPromise;\n };\n });\n};\n\nmodule.exports.transferPromiseness = (assertion, promise) => {\n assertion.then = promise.then.bind(promise);\n};\n\nmodule.exports.transformAsserterArgs = values => values;\n"},"lineCount":362}},"hash":"9a9e51136398f564cdfcdab45f943136","cacheData":{"env":{}}} |