diff --git a/backend/src/api.ts b/backend/src/api.ts index 8efe921..a0ba51b 100644 --- a/backend/src/api.ts +++ b/backend/src/api.ts @@ -72,7 +72,6 @@ export class Session { this.lang = lang; this.logPrimitive = log; this.log(`Creating session, language ${this.lang}`); - this.setup(); } run = async (args: string[], options?: Options) => { diff --git a/backend/src/server.ts b/backend/src/server.ts index e98c949..e61161c 100644 --- a/backend/src/server.ts +++ b/backend/src/server.ts @@ -78,7 +78,7 @@ function addWebsocket( ); ws.close(); } else { - new api.Session(ws, lang, console.log); + new api.Session(ws, lang, console.log).setup(); } }); return app; diff --git a/backend/src/test-runner.ts b/backend/src/test-runner.ts index 972dbc7..9c23c99 100644 --- a/backend/src/test-runner.ts +++ b/backend/src/test-runner.ts @@ -75,6 +75,7 @@ class Test { this.timedOut = true; this.handleUpdate(); }, TIMEOUT_MS); + await session.setup(); switch (this.type) { case "ensure": await this.testEnsure(); @@ -273,6 +274,7 @@ async function main() { } catch (err) { console.error("failed:"); console.error(test.getLog()); + console.error(err); } } }