diff --git a/backend/api.js b/backend/api.js index a0b6b83..44d0856 100644 --- a/backend/api.js +++ b/backend/api.js @@ -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); - }, 1500); - } + setTimeout(() => { + this.term.pty.stdout.emit("data", TEST_RUN_FINISHED); + }, 1500); break; case "formatCode": if (typeof msg.code !== "string") {