Comparing version 3.6.8 to 3.6.9
{ | ||
"name": "pactum", | ||
"version": "3.6.8", | ||
"version": "3.6.9", | ||
"description": "REST API Testing Tool for all levels in a Test Pyramid", | ||
@@ -14,2 +14,3 @@ "main": "./src/index.js", | ||
"test:component": "mocha --timeout 10000 ./test/component/", | ||
"test:component:tag": "mocha --timeout 10000 ./test/component/ --grep '@tag'", | ||
"coverage": "nyc --reporter=lcov --reporter=text npm run test", | ||
@@ -16,0 +17,0 @@ "lint": "eslint src/**/*.js" |
@@ -459,4 +459,10 @@ import FormData from 'form-data-lite'; | ||
end(): Spec; | ||
/** | ||
* sleep after spec execution | ||
* @see https://pactumjs.github.io/api/utils/sleep.html | ||
*/ | ||
sleep(ms: number): Spec; | ||
} | ||
declare namespace Spec { } |
@@ -42,2 +42,3 @@ const fs = require('fs'); | ||
this._specHandlerData = data; | ||
this._sleep = ''; | ||
hr.spec(name, data, this); | ||
@@ -48,2 +49,7 @@ this._opts = opts || {}; | ||
} | ||
sleep(ms) { | ||
this._sleep = ms; | ||
return this; | ||
} | ||
@@ -50,0 +56,0 @@ name(value) { |
@@ -22,2 +22,3 @@ const phin = require('phin'); | ||
this.expect = spec._expect; | ||
this.sleep = spec._sleep; | ||
this.interactions = spec.interactions; | ||
@@ -54,2 +55,3 @@ this.previousLogLevel = spec.previousLogLevel; | ||
} finally { | ||
this.sleep > 0 && await helper.sleep(this.sleep); | ||
await this.removeInteractionsFromServer(); | ||
@@ -56,0 +58,0 @@ this.setPreviousLogLevel(); |
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
177235
5323