@babel/helper-fixtures
Advanced tools
Comparing version 7.5.5 to 7.6.0
@@ -176,2 +176,4 @@ "use strict"; | ||
const expectLoc = findFile(taskDir + "/output", true) || taskDir + "/output.js"; | ||
const stdoutLoc = taskDir + "/stdout.txt"; | ||
const stderrLoc = taskDir + "/stderr.txt"; | ||
@@ -200,2 +202,12 @@ const actualLocAlias = suiteName + "/" + taskName + "/" + _path().default.basename(actualLoc); | ||
options: taskOpts, | ||
validateLogs: taskOpts.validateLogs, | ||
ignoreOutput: taskOpts.ignoreOutput, | ||
stdout: { | ||
loc: stdoutLoc, | ||
code: readFile(stdoutLoc) | ||
}, | ||
stderr: { | ||
loc: stderrLoc, | ||
code: readFile(stderrLoc) | ||
}, | ||
exec: { | ||
@@ -268,2 +280,19 @@ loc: execLoc, | ||
} | ||
if (!test.validateLogs && (test.stdout.code || test.stderr.code)) { | ||
throw new Error("stdout.txt and stderr.txt are only allowed when the 'validateLogs' option is enabled: " + (test.stdout.code ? stdoutLoc : stderrLoc)); | ||
} | ||
if (test.options.ignoreOutput) { | ||
if (test.expect.code) { | ||
throw new Error("Test cannot ignore its output and also validate it: " + expectLoc); | ||
} | ||
if (!test.validateLogs) { | ||
throw new Error("ignoreOutput can only be used when validateLogs is true: " + taskOptsLoc); | ||
} | ||
} | ||
delete test.options.validateLogs; | ||
delete test.options.ignoreOutput; | ||
} | ||
@@ -270,0 +299,0 @@ } |
{ | ||
"name": "@babel/helper-fixtures", | ||
"version": "7.5.5", | ||
"version": "7.6.0", | ||
"description": "Helper function to support fixtures", | ||
@@ -17,3 +17,3 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
}, | ||
"gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43" | ||
"gitHead": "cbd5a26e57758e3f748174ff84aa570e8780e85d" | ||
} |
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
10500
246