Wait for code to finish w/ crappy set timeout 6

This commit is contained in:
plondon 2021-10-24 17:04:13 -04:00
parent f7b1c2bceb
commit 8f1d54504a
1 changed files with 4 additions and 6 deletions

View File

@ -12,7 +12,7 @@ import * as util from "./util.js";
import { bash, getUUID, logError } from "./util.js";
const allSessions = new Set();
export const TEST_RUN_FINISHED = "Test run finished!\n";
export const TEST_RUN_FINISHED = "\nTest run finished!\n";
export class Session {
get homedir() {
return "/home/riju/src";
@ -235,11 +235,9 @@ export class Session {
break;
}
await this.runCode(msg.code, msg.expectedOutput);
if (this.config.repl) {
setTimeout(() => {
this.term.pty.stdin.write(TEST_RUN_FINISHED);
this.term.pty.stdout.emit("data", TEST_RUN_FINISHED);
}, 1500);
}
break;
case "formatCode":
if (typeof msg.code !== "string") {