aboutsummaryrefslogtreecommitdiff
path: root/test/console/commandline/CommandParser.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-09-26 17:01:31 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-09-26 17:23:14 +0900
commite304581fb15eabb3a973d363a282ee7546561e01 (patch)
tree1afb21a2dee2ada3d10c1417fa61c0aae1f83077 /test/console/commandline/CommandParser.test.ts
parent11d6d725eee2ac0a1c16e4c7a4ce4f296bb6b016 (diff)
Do not use chai on unit test
Diffstat (limited to 'test/console/commandline/CommandParser.test.ts')
-rw-r--r--test/console/commandline/CommandParser.test.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/console/commandline/CommandParser.test.ts b/test/console/commandline/CommandParser.test.ts
index f72afd6..a8e82df 100644
--- a/test/console/commandline/CommandParser.test.ts
+++ b/test/console/commandline/CommandParser.test.ts
@@ -2,16 +2,15 @@ import CommandParser, {
UnknownCommandError,
} from "../../../src/console/commandline/CommandParser";
import { Command } from "../../../src/shared/Command";
-import { expect } from "chai";
describe("CommandParser", () => {
describe("#parse", () => {
it("returns matched command with the string", () => {
const sut = new CommandParser();
- expect(sut.parse("open")).to.equal(Command.Open);
- expect(sut.parse("w")).to.equal(Command.WindowOpen);
- expect(sut.parse("bdelete!")).to.equal(Command.BufferDeleteForce);
- expect(() => sut.parse("harakiri")).to.throw(UnknownCommandError);
+ expect(sut.parse("open")).toEqual(Command.Open);
+ expect(sut.parse("w")).toEqual(Command.WindowOpen);
+ expect(sut.parse("bdelete!")).toEqual(Command.BufferDeleteForce);
+ expect(() => sut.parse("harakiri")).toThrow(UnknownCommandError);
});
});
});