Comparing version 2.13.0 to 2.14.0
@@ -29,2 +29,4 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
const requestInjector = require('./request-recorder/request-injector'); | ||
const nockBack = nock.back; | ||
@@ -81,10 +83,7 @@ const nockRecorder = nock.recorder; | ||
nockBack.fixtures = opts.cassetteFolder; | ||
nockListener.subscribe('no match', (req, options, body) => { | ||
nockListener.subscribe('no match', () => { | ||
assert(hasCassette === true); | ||
const options = requestInjector.getLastOptions(); | ||
if (anyFlagPresent(['record'])) { | ||
if (options === undefined) { | ||
throw new Error('Please delete empty cassette instead of using "record" option.'); | ||
} | ||
expectedCassette.push(async () => { | ||
@@ -101,3 +100,7 @@ nockRecorder.rec({ | ||
}); | ||
r.write(body); | ||
if (options.body !== undefined) { | ||
r.write(options.body); | ||
} | ||
r.end(); | ||
@@ -113,6 +116,2 @@ }); | ||
} else if (anyFlagPresent(['stub'])) { | ||
if (options === undefined) { | ||
throw new Error('Please delete empty cassette instead of using "stub" option.'); | ||
} | ||
expectedCassette.push({ | ||
@@ -122,3 +121,3 @@ scope: `${options.uri.protocol}//${options.uri.host}`, | ||
path: options.uri.path, | ||
body: tryParseJson(body), | ||
body: tryParseJson(options.body), | ||
status: 200, | ||
@@ -129,8 +128,2 @@ response: {}, | ||
} | ||
if (!anyFlagPresent(['magic', 'prune'])) { | ||
expectedCassette.push(...pendingMocks.map(({ | ||
record | ||
}) => record)); | ||
} | ||
}); | ||
@@ -190,5 +183,10 @@ nockDone = await new Promise(resolve => nockBack(cassetteFile, { | ||
}, resolve)); | ||
requestInjector.inject(); | ||
}, | ||
release: async () => { | ||
assert(nockDone !== null); | ||
requestInjector.release(); | ||
nockDone(); | ||
nockDone = null; | ||
nockListener.unsubscribeAll('no match'); | ||
@@ -203,8 +201,6 @@ for (let idx = 0; idx < expectedCassette.length; idx += 1) { | ||
nockDone(); | ||
nockDone = null; | ||
nockListener.unsubscribeAll('no match'); | ||
if (opts.heal !== false) { | ||
fs.smartWrite(cassetteFilePath, expectedCassette, { | ||
fs.smartWrite(cassetteFilePath, anyFlagPresent(['magic', 'prune']) ? expectedCassette : [...expectedCassette, ...pendingMocks.map(({ | ||
record | ||
}) => record)], { | ||
keepOrder: outOfOrderErrors.length === 0 && pendingMocks.length === 0 | ||
@@ -240,2 +236,2 @@ }); | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tb2R1bGVzL3JlcXVlc3QtcmVjb3JkZXIuanMiXSwibmFtZXMiOlsiYXNzZXJ0IiwicmVxdWlyZSIsImh0dHAiLCJwYXRoIiwiZnMiLCJKb2kiLCJub2NrIiwibm9ja0xpc3RlbmVyIiwiaGVhbFNxc1NlbmRNZXNzYWdlQmF0Y2giLCJidWlsZEtleSIsInRyeVBhcnNlSnNvbiIsImNvbnZlcnRIZWFkZXJzIiwibm9ja0JhY2siLCJiYWNrIiwibm9ja1JlY29yZGVyIiwicmVjb3JkZXIiLCJtb2R1bGUiLCJleHBvcnRzIiwib3B0cyIsIm9iamVjdCIsImtleXMiLCJjYXNzZXR0ZUZvbGRlciIsInN0cmluZyIsInN0cmlwSGVhZGVycyIsImJvb2xlYW4iLCJzdHJpY3QiLCJoZWFsIiwiYWx0ZXJuYXRpdmVzIiwibm9ja0RvbmUiLCJjYXNzZXR0ZUZpbGVQYXRoIiwia25vd25DYXNzZXR0ZU5hbWVzIiwicmVjb3JkcyIsIm91dE9mT3JkZXJFcnJvcnMiLCJleHBlY3RlZENhc3NldHRlIiwicGVuZGluZ01vY2tzIiwiYW55RmxhZ1ByZXNlbnQiLCJmbGFncyIsIkFycmF5IiwiaXNBcnJheSIsImxlbmd0aCIsIm5lZWRsZUZsYWdzI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ICAgICAgICAgIHJlc3BvbnNlLm9uKCdlbmQnLCByZXNvbHZlKTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIHIud3JpdGUoYm9keSk7XG4gICAgICAgICAgICAgIHIuZW5kKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNvbnN0IHJlY29yZGVkID0gbm9ja1JlY29yZGVyLnBsYXkoKTtcbiAgICAgICAgICAgIG5vY2tSZWNvcmRlci5jbGVhcigpO1xuICAgICAgICAgICAgcmV0dXJuIHJlY29yZGVkLm1hcCgocmVjb3JkKSA9PiBPYmplY3QuYXNzaWduKHJlY29yZCwge1xuICAgICAgICAgICAgICBoZWFkZXJzOiBvcHRzLnN0cmlwSGVhZGVycyA9PT0gdHJ1ZSA/IHVuZGVmaW5lZCA6IGNvbnZlcnRIZWFkZXJzKHJlY29yZC5yYXdIZWFkZXJzKSxcbiAgICAgICAgICAgICAgcmF3SGVhZGVyczogdW5kZWZpbmVkXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSBpZiAoYW55RmxhZ1ByZXNlbnQoWydzdHViJ10pKSB7XG4gICAgICAgICAgaWYgKG9wdGlvbnMgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdQbGVhc2UgZGVsZXRlIGVtcHR5IGNhc3NldHRlIGluc3RlYWQgb2YgdXNpbmcgXCJzdHViXCIgb3B0aW9uLicpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBleHBlY3RlZENhc3NldHRlLnB1c2goe1xuICAgICAgICAgICAgc2NvcGU6IGAke29wdGlvbnMudXJpLnByb3RvY29sfS8vJHtvcHRpb25zLnVyaS5ob3N0fWAsXG4gICAgICAgICAgICBtZXRob2Q6IG9wdGlvbnMubWV0aG9kLFxuICAgICAgICAgICAgcGF0aDogb3B0aW9ucy51cmkucGF0aCxcbiAgICAgICAgICAgIGJvZHk6IHRyeVBhcn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F0Y2hcbiAgICAgICAgICAgICAgXS5yZWR1Y2UoXG4gICAgICAgICAgICAgICAgKHJlc3BCb2R5LCBmbikgPT4gZm4ocmVxdWVzdEJvZHlTdHJpbmcsIHJlc3BCb2R5LCBzY29wZSksXG4gICAgICAgICAgICAgICAgaW50ZXJjZXB0b3IuYm9keVxuICAgICAgICAgICAgICApKTtcbiAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXBhcmFtLXJlYXNzaWduXG4gICAgICAgICAgICAgIGludGVyY2VwdG9yLmJvZHkgPSByZXNwb25zZUJvZHk7XG4gICAgICAgICAgICAgIHBlbmRpbmdNb2Nrc1tpZHhdLnJlY29yZC5yZXNwb25zZSA9IHJlc3BvbnNlQm9keTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZXhwZWN0ZWRDYXNzZXR0ZS5wdXNoKHBlbmRpbmdNb2Nrc1tpZHhdLnJlY29yZCk7XG4gICAgICAgICAgICBpZiAoaWR4ICE9PSAwKSB7XG4gICAgICAgICAgICAgIG91dE9mT3JkZXJFcnJvcnMucHVzaChwZW5kaW5nTW9ja3NbaWR4XS5rZXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGVuZGluZ01vY2tzLnNwbGljZShpZHgsIDEpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBhZnRlclJlY29yZDogKHJlY29yZGluZ3MpID0+IEpTT04uc3RyaW5naWZ5KHJlY29yZGluZ3MubWFwKChyKSA9PiAoe1xuICAgICAgICAgIC4uLnIsXG4gICAgICAgICAgYm9keTogdHJ5UGFyc2VKc29uKHIuYm9keSksXG4gICAgICAgICAgcmF3SGVhZGVyczogb3B0cy5zdHJpcEhlYWRlcnMgPT09IHRydWUgPyB1bmRlZmluZWQgOiByLnJhd0hlYWRlcnNcbiAgICAgICAgfSkpLCBudWxsLCAyKVxuICAgICAgfSwgcmVzb2x2ZSkpO1xuICAgIH0sXG4gICAgc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J0KGhhc0Nhc3NldHRlID09PSB0cnVlKTtcbiAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHJlcXVlc3RJbmplY3Rvci5nZXRMYXN0T3B0aW9ucygpO1xuICAgICAgICBpZiAoYW55RmxhZ1ByZXNlbnQoWydyZWNvcmQnXSkpIHtcbiAgICAgICAgICBleHBlY3RlZENhc3NldHRlLnB1c2goYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgbm9ja1JlY29yZGVyLnJlYyh7XG4gICAgICAgICAgICAgIG91dHB1dF9vYmplY3RzOiB0cnVlLFxuICAgICAgICAgICAgICBkb250X3ByaW50OiB0cnVlLFxuICAgICAgICAgICAgICBlbmFibGVfcmVxaGVhZGVyc19yZWNvcmRpbmc6IGZhbHNlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGF3YWl0IG5ldyBQcm9taXNlKChyZXNvbHZlKSA9PiB7XG4gICAgICAgICAgICAgIGNvbnN0IHIgPSBodHRwLnJlcXVlc3Qob3B0aW9ucywgKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgcmVzcG9uc2Uub24oJ2RhdGEnLCAoKSA9PiB7fSk7XG4gICAgICAgICAgICAgICAgcmVzcG9uc2Uub24oJ2VuZCcsIHJlc29sdmUpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuYm9keSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgci53cml0ZShvcHRpb25zLmJvZHkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHIuZW5kKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNvbnN0IHJlY29yZGVkID0gbm9ja1JlY29yZGVyLnBsYXkoKTtcbiAgICAgICAgICAgIG5vY2tSZWNvcmRlci5jbGVhcigpO1xuICAgICAgICAgICAgcmV0dXJuIHJlY29yZGVkLm1hcCgocmVjb3JkKSA9PiBPYmplY3QuYXNzaWduK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SkgPT4ge1xuICAgICAgICAgICAgaWYgKGFueUZsYWdQcmVzZW50KFsnbWFnaWMnLCAnYm9keSddKSkge1xuICAgICAgICAgICAgICBjb25zdCBpZHggPSBwZW5kaW5nTW9ja3MuZmluZEluZGV4KChtKSA9PiBtLmlkeCA9PT0gc2NvcGVJZHgpO1xuICAgICAgICAgICAgICBjb25zdCByZXF1ZXN0Qm9keSA9IHRyeVBhcnNlSnNvbihib2R5KTtcbiAgICAgICAgICAgICAgcGVuZGluZ01vY2tzW2lkeF0ucmVjb3JkLmJvZHkgPSByZXF1ZXN0Qm9keSA9PT0gbnVsbCA/ICdudWxsJyA6IHJlcXVlc3RCb2R5O1xuICAgICAgICAgICAgICByZXR1cm4gc2NvcGUuYm9keTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBib2R5O1xuICAgICAgICAgIH07XG4gICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLXBhcmFtLXJlYXNzaWduXG4gICAgICAgICAgc2NvcGUuZmlsdGVyaW5nUGF0aCA9IChyZXF1ZXN0UGF0aCkgPT4ge1xuICAgICAgICAgICAgaWYgKGFueUZsYWdQcmVzZW50KFsnbWFnaWMnLCAncGF0aCddKSkge1xuICAgICAgICAgICAgICBjb25zdCBpZHggPSBwZW5kaW5nTW9ja3MuZmluZEluZGV4KChtKSA9PiBtLmlkeCA9PT0gc2NvcGVJZHgpO1xuICAgICAgICAgICAgICBwZW5kaW5nTW9ja3NbaWR4XS5yZWNvcmQucGF0aCA9IHJlcXVlc3RQYXRoO1xuICAgICAgICAgICAgICByZXR1cm4gc2NvcGUucGF0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXF1ZXN0UGF0aDtcbiAgICAgICAgICB9O1xuICAgICAgICAgIHJldHVybiBzY29wZTtcbiAgICAgICAgfSxcbiAgICAgICAgYWZ0ZXI6IChzY29wZSwgc2NvcGVJZHgpID0+IHtcbiAgICAgICAgICBzY29wZS5vbigncmVxdWVzdCcsIChyZXEsIGludGVyY2VwdG9yLCByZXF1ZXN0Qm9keVN0cmluZykgPT4ge1xuICAgICAgICAgICAgY29uc3QgaWR4ID0gcGVuZGluZ01vY2tzLmZpbmRJbmRleCgoZSkgPT4gZS5pZHggPT09IHNjb3BlSWR4KTtcblxuICAgICAgICAgICAgaWYgKGFueUZsYWdQcmVzZW50KFsnbWFnaWMnLCAncmVzcG9uc2UnXSkpIHtcbiAgICAgICAgICAgICAgY29uc3QgcmVzcG9uc2VCb2R5ID0gdHJ5UGFyc2VKc29uKFtcbiAgICAgICAgICAgICAgICBoZWFsU3FzU2VuZE1lc3NhZ2VCYXRjaFxuICAgICAgICAgICAgICBdLnJlZHVjZShcbiAgICAgICAgICAgICAgICAocmVzcEJvZHksIGZuKSA9PiBmbihyZXF1ZXN0Qm9keVN0cmluZywgcmVzcEJvZHksIHNjb3BlKSxcbiAgICAgICAgICAgICAgICBpbnRlcmNlcHRvci5ib2R5XG4gICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tcGFyYW0tcmVhc3NpZ25cbiAgICAgICAgICAgICAgaW50ZXJjZXB0b3IuYm9keSA9IHJlc3BvbnNlQm9keTtcbiAgICAgICAgICAgICAgcGVuZGluZ01vY2tzW2lkeF0ucmVjb3JkLnJlc3BvbnNlID0gcmVzcG9uc2VCb2R5O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleHBlY3RlZENhc3NldHRlLnB1c2gocGVuZGluZ01vY2tzW2lkeF0ucmVjb3JkKTtcbiAgICAgICAgICAgIGlmIChpZHggIT09IDApIHtcbiAgICAgICAgICAgICAgb3V0T2ZPcmRlckVycm9ycy5wdXNoKHBlbmRpbmdNb2Nrc1tpZHhdLmtleSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwZW5kaW5nTW9ja3Muc3BsaWNlKGlkeCwgMSk7XG4gICAgIC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Y3RlZEZpbGVzLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFVuZXhwZWN0ZWQgZmlsZShzKSBpbiBjYXNzZXR0ZSBmb2xkZXI6ICR7dW5leHBlY3RlZEZpbGVzLmpvaW4oJywgJyl9YCk7XG4gICAgICB9XG4gICAgfSxcbiAgICBnZXQ6ICgpID0+ICh7XG4gICAgICByZWNvcmRzOiByZWNvcmRzLnNsaWNlKCksXG4gICAgICBvdXRPZk9yZGVyRXJyb3JzOiBvdXRPZk9yZGVyRXJyb3JzLnNsaWNlKCksXG4gICAgICB1bm1hdGNoZWRSZWNvcmRpbmdzOiBwZW5kaW5nTW9ja3MubWFwKChlKSA9PiBlLmtleSkuc2xpY2UoKSxcbiAgICAgIGV4cGVjdGVkQ2Fzc2V0dGU6IGV4cGVjdGVkQ2Fzc2V0dGUuc2xpY2UoKSxcbiAgICAgIGNhc3NldHRlRmlsZVBhdGhcbiAgICB9KVxuICB9KTtcbn07XG4iXX0= |
{ | ||
"name": "node-tdd", | ||
"version": "2.13.0", | ||
"version": "2.14.0", | ||
"description": "Drop in extension for mocha to abstract commonly used test setups", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121556
15
707
2