testeranto 0.128.0 → 0.129.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ async function fileHash(filePath, algorithm = "md5") {
34
34
  }
35
35
  const statusMessagePretty = (failures, test) => {
36
36
  if (failures === 0) {
37
- console.log(ansiC.green(ansiC.inverse(`> ${test} completed successfully`)));
37
+ console.log(ansiC.green(ansiC.inverse(`> ${test} completed successfully?!?`)));
38
38
  }
39
39
  else {
40
40
  console.log(ansiC.red(ansiC.inverse(`> ${test} failed ${failures} times`)));
@@ -468,30 +468,28 @@ ${addableFiles
468
468
  stdio: ["pipe", "pipe", "pipe", "ipc"],
469
469
  // silent: true
470
470
  });
471
- // const child = spawn(
472
- // "node",
473
- // ["inspect", builtfile, testResources, "--trace-warnings"],
474
- // {
475
- // stdio: ["pipe", "pipe", "pipe", "ipc"],
476
- // env: {
477
- // // NODE_INSPECT_RESUME_ON_START: "1",
478
- // },
479
- // // silent: true
480
- // }
481
- // );
482
- // console.log(
483
- // "spawning",
484
- // "node",
485
- // ["inspect", builtfile, testResources, "--trace-warnings"],
486
- // {
487
- // NODE_INSPECT_RESUME_ON_START: "1",
488
- // }
489
- // );
490
- const p = destFolder + "/pipe";
471
+ const p = destFolder + "/tpipe";
472
+ // exec(`lsof`, (ec, out, err) => {
473
+ // console.log(ec, out, err);
474
+ // });
475
+ // if (fs.existsSync(p)) {
476
+ // fs.rmSync(p);
477
+ // }
491
478
  const errFile = `${reportDest}/error.txt`;
492
479
  if (fs.existsSync(errFile)) {
493
480
  fs.rmSync(errFile);
494
481
  }
482
+ // server.on("error", (e) => {
483
+ // if (e.code === "EADDRINUSE") {
484
+ // console.error(e);
485
+ // process.exit(-1);
486
+ // // console.error("Address in use, retrying...");
487
+ // // setTimeout(() => {
488
+ // // server.close();
489
+ // // server.listen(p);
490
+ // // }, 1000);
491
+ // }
492
+ // });
495
493
  server.listen(p, () => {
496
494
  var _a, _b;
497
495
  (_a = child.stderr) === null || _a === void 0 ? void 0 : _a.on("data", (data) => {
@@ -501,6 +499,11 @@ ${addableFiles
501
499
  oStream.write(`stdout data ${data}`);
502
500
  });
503
501
  child.on("close", (code) => {
502
+ console.log("close");
503
+ console.log("deleting", p);
504
+ if (fs.existsSync(p)) {
505
+ fs.rmSync(p);
506
+ }
504
507
  oStream.close();
505
508
  server.close();
506
509
  if (code === null) {
@@ -515,19 +518,23 @@ ${addableFiles
515
518
  this.bddTestIsNowDone(src, code);
516
519
  statusMessagePretty(code, src);
517
520
  }
518
- if (fs.existsSync(p)) {
519
- fs.rmSync(p);
520
- }
521
521
  haltReturns = true;
522
522
  });
523
523
  child.on("exit", (code) => {
524
+ console.log("exit");
525
+ console.log("deleting", p);
526
+ if (fs.existsSync(p)) {
527
+ fs.rmSync(p);
528
+ }
524
529
  haltReturns = true;
525
530
  });
526
531
  child.on("error", (e) => {
527
- haltReturns = true;
532
+ console.log("error");
533
+ console.log("deleting", p);
528
534
  if (fs.existsSync(p)) {
529
535
  fs.rmSync(p);
530
536
  }
537
+ haltReturns = true;
531
538
  console.log(ansiC.red(ansiC.inverse(`${src} errored with: ${e.name}. Check ${errFile}for more info`)));
532
539
  this.writeFileSync(`${reportDest}/error.txt`, e.toString(), src);
533
540
  this.bddTestIsNowDone(src, -1);