Wait for code to finish w/ crappy set timeout 4

This commit is contained in:
plondon 2021-10-24 16:31:59 -04:00
parent 29ec7d1469
commit 307879b026
2 changed files with 4 additions and 4 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!\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":

View File

@ -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 = [];
}