Skip to content

Commit

Permalink
can't have nice things
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshwolfe committed Feb 19, 2024
1 parent 7d174a2 commit 343333e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ pend.go(function(cb) {
var args = parametersToTest[f];
var script = path.join(examplesDir, f);

if (f === "unzip.js" && typeof fs.rmSync !== "function") {
console.log("WARNING: skipping examples/unzip.js tests for node <14");
continue;
}

args.forEach(function(arg) {
var args = [path.resolve(script)];
var options = {
Expand All @@ -380,7 +385,6 @@ pend.go(function(cb) {
} else {
testId = `examples/${f}: `;
}
process.stdout.write(testId);

// Handle special cases.
if (f === "dump.js" && /traditional-encryption/.exec(path.basename(arg))) {
Expand All @@ -393,6 +397,7 @@ pend.go(function(cb) {
options.cwd = tmpDir;
}

process.stdout.write(testId);
var {status, error} = child_process.spawnSync("node", args, options);
if (status) error = new Error("child process return exit code " + status);
if (error) throw error;
Expand Down

0 comments on commit 343333e

Please sign in to comment.