Skip to content

Commit

Permalink
test: coverage for command concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpheus committed Sep 23, 2024
1 parent 4ba941d commit 1fd3d8a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/jest/Bladeburner/BladeburnerConsole.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Bladeburner } from "../../../src/Bladeburner/Bladeburner";
import { FormatsNeedToChange } from "../../../src/ui/formatNumber";
import { Player, setPlayer } from "@player";
import { PlayerObject } from "../../../src/PersonObjects/Player/PlayerObject";
import { BladeburnerContractName } from "@enums";
Expand All @@ -21,6 +20,12 @@ describe("Bladeburner Console", () => {
inst.clearConsole();
});

it("May concatenate multiple commands with ';'", () => {
inst.startAction(Contract.createId(BladeburnerContractName.Tracking));
bb("stop;start contract Retirement;help cls;");
expect(inst.consoleLogs).not.toContainEqual("Invalid console command");
});

describe.each(FEEDBACK_CMDS)("%s", (cmd: string) => {
it("provides valid console feedback", () => {
bb(cmd);
Expand Down Expand Up @@ -82,6 +87,6 @@ describe("Bladeburner Console", () => {
});

function bb(cmd: string) {
inst.executeConsoleCommand(cmd);
inst.executeConsoleCommands(cmd);
}
});

0 comments on commit 1fd3d8a

Please sign in to comment.