diff --git a/README.md b/README.md index 4166e8ce4..74d334ae2 100644 --- a/README.md +++ b/README.md @@ -264,9 +264,10 @@ runner.run(collection, { /* options */ }, function(err, run) { }, // Called before running a new Item (check the postman collection v2 format for what Item means) - beforeItem: function (err, cursor, item) { + beforeItem: function (err, cursor, item, environment) { // err, cursor: Same as arguments for "start" // item: sdk.Item + // environment: }, // Called after completion of an Item diff --git a/lib/runner/extensions/item.command.js b/lib/runner/extensions/item.command.js index ebfa3cc70..0063fdfbc 100644 --- a/lib/runner/extensions/item.command.js +++ b/lib/runner/extensions/item.command.js @@ -132,7 +132,7 @@ module.exports = { coords.ref = uuid.v4(); // here we code to queue prerequest script, then make a request and then execute test script - this.triggers.beforeItem(null, coords, item); + this.triggers.beforeItem(null, coords, item, environment); this.queueDelay(function () { // create the context object for scripts to run