diff --git a/exec/agent-lang.ts b/exec/agent-lang.ts index e5f5b28..1a7c645 100644 --- a/exec/agent-lang.ts +++ b/exec/agent-lang.ts @@ -48,8 +48,8 @@ interpreter.get(sourceCode, config).subscribe((output: InterpreterOutput) => { } else { writeFileSync(outputFile, JSON.stringify(programOutput, null, 2)); } + Logger.done(`Output has been written to ${outputFile}`); - Process.exit(0); } }); diff --git a/tests/interpreter.test.ts b/tests/interpreter.test.ts index cd95f44..da9cfbe 100644 --- a/tests/interpreter.test.ts +++ b/tests/interpreter.test.ts @@ -12,7 +12,6 @@ const INTERPRETER_STEP_TESTING_DATA = [ describe("Interpreter", () => { let subscription: Subscription; - let interpreter: Interpreter; let config: InterpreterConfiguration = { width: 500, height: 500, steps: 10000, delay: 200 }; diff --git a/tests/parser.test.ts b/tests/parser.test.ts index fe23d53..621a4ea 100644 --- a/tests/parser.test.ts +++ b/tests/parser.test.ts @@ -369,6 +369,7 @@ describe("Parser", () => { test("should not allow adding default value to const", () => { const code = "agent person 10 { const c: 10 = 20; }"; + // @ts-ignore expect(() => getProgram(code).toThrow(ErrorParser)); }); diff --git a/tests/runtime.test.ts b/tests/runtime.test.ts index 791d4ac..3e39baf 100644 --- a/tests/runtime.test.ts +++ b/tests/runtime.test.ts @@ -77,12 +77,12 @@ function testExpression(entry: ExpressionTestingData) { switch (type) { case ValueType.Number: { const value = TestSupport.expectValue(agent.variables.get("value"), ValueType.Number); - expect(value.value).toBe(result); + expect(value.value).toBe(result as number); break; } case ValueType.Boolean: { const value = TestSupport.expectValue(agent.variables.get("value"), ValueType.Boolean); - expect(value.value).toBe(result); + expect(value.value).toBe(result as boolean); break; } }