diff --git a/backend/api.js b/backend/api.js index 4646a00..a0b6b83 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!\n"; +export const TEST_RUN_FINISHED = "Test run finished!\n"; export class Session { get homedir() { return "/home/riju/src"; @@ -235,10 +235,10 @@ export class Session { break; } await this.runCode(msg.code, msg.expectedOutput); - if (!this.config.repl) { + if (this.config.repl) { setTimeout(() => { this.term.pty.stdin.write(TEST_RUN_FINISHED); - }); + }, 1500); } break; case "formatCode": diff --git a/frontend/src/app.js b/frontend/src/app.js index 2d78612..caa4bdc 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -152,7 +152,7 @@ async function main() { term.write(message.output); testData.push(message.output); - if (testData.join("").includes('Test run')) { + if (testData.join("").includes('Test run finished')) { postTestResults(testData, message.expectedOutput); testData = []; }