Skip to content

Commit

Permalink
chore(cleanup): Complete code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasBoda committed Apr 30, 2024
1 parent 9173dbe commit 9e3c821
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exec/agent-lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down
1 change: 0 additions & 1 deletion tests/interpreter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
1 change: 1 addition & 0 deletions tests/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});

Expand Down
4 changes: 2 additions & 2 deletions tests/runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ function testExpression(entry: ExpressionTestingData) {
switch (type) {
case ValueType.Number: {
const value = TestSupport.expectValue<NumberValue>(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<BooleanValue>(agent.variables.get("value"), ValueType.Boolean);
expect(value.value).toBe(result);
expect(value.value).toBe(result as boolean);
break;
}
}
Expand Down

0 comments on commit 9e3c821

Please sign in to comment.