@jakechampion/cli-testing-library
Version:
Small but powerful library for testing CLI the way it is used by people.
11 lines (10 loc) • 396 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkRunningProcess = void 0;
const checkRunningProcess = (currentProcessRef) => {
if (!currentProcessRef.current) {
throw new Error('No process is running. Start it with `execute`, or the process has already finished.');
}
return true;
};
exports.checkRunningProcess = checkRunningProcess;