remove unnesscessary values

This commit is contained in:
Nicholas Palenchar
2020-01-24 13:34:24 -05:00
parent 113939c273
commit 0da1f3a406

View File

@@ -18,7 +18,7 @@ export default function runTestScriptWitVariables(script, variables) {
_report: '',
expect: function(value) {
try {
return expect(value, this._testReports, arguments);
return expect(value, this._testReports);
} catch (e) {
pw._testReports.push({result: ERROR, message: e});
}
@@ -29,7 +29,6 @@ export default function runTestScriptWitVariables(script, variables) {
Object.assign(pw, variables);
// run pre-request script within this function so that it has access to the pw object.
let errors = null;
new Function("pw", script)(pw);
//
const testReports = pw._testReports.map(item => {
@@ -144,9 +143,3 @@ class Expectation {
: this._fail(this._fmtNot(`Expected ${this.expectValue} to (not)be 500-level status`));
}
}
class PostwomanTestFailure {
constructor(message) {
return {message}
}
}