You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of working on trying to test command line applications that spin up servers (like say a livereload server), there is a particular line of code in runner.js that will never resolve() in this case (since a live reload server will never close), thus causing a test runner to hang.
before(asyncfunction(){awaitrunner.setup(outputPath);awaitrunner.runCommand(cliPath,'develop');console.debug('gets here?');// never gets here and test runner never advances});
Details
Specifically, this block isn't getting called, thus never fulfilling the Promise
close(){console.debug('manually force close!');this.npm.kill();}
Leaning towards option 2, which would still require a little boilerplate from the user I believe
before(asyncfunction(){awaitrunner.setup(outputPath);returnnewPromise(async(resolve)=>{// notice we call it _without_ using awaitrunner.runCommand(cliPath,'develop');setTimeout(()=>{resolve();},3000);});});
...
after(function(){runner.close();});
The text was updated successfully, but these errors were encountered:
thescientist13
changed the title
enable the ability to manipulate and work around processes that do not close
enable the ability to manage processes that do not close
Jul 21, 2021
Type of Change
Summary
As part of working on trying to test command line applications that spin up servers (like say a livereload server), there is a particular line of code in runner.js that will never
resolve()
in this case (since a live reload server will never close), thus causing a test runner to hang.Details
Specifically, this block isn't getting called, thus never fulfilling the
Promise
So a couple options are:
resolve()
inkill
the child process, e.g.Leaning towards option 2, which would still require a little boilerplate from the user I believe
The text was updated successfully, but these errors were encountered: