diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-10-10 01:42:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 01:42:37 +0000 |
commit | dfcefe1b84cc96ead1c8d8f9aa65ff05ccd70378 (patch) | |
tree | 12f1a4ed6da8fd96c034d23bcf08b1535bca1113 /test/shared/operations.test.ts | |
parent | 24f4f06db6572d81cadfe191f36c433a79985871 (diff) | |
parent | 039095e18562c44edda2c5a83a3d82c2e220b370 (diff) |
Merge pull request #1267 from ueokande/move-to-jest
Move to Jest
Diffstat (limited to 'test/shared/operations.test.ts')
-rw-r--r-- | test/shared/operations.test.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/shared/operations.test.ts b/test/shared/operations.test.ts index 449b25e..9fa9e19 100644 --- a/test/shared/operations.test.ts +++ b/test/shared/operations.test.ts @@ -1,5 +1,4 @@ import * as operations from "../../src/shared/operations"; -import { expect } from "chai"; describe("operations", () => { describe("#valueOf", () => { @@ -8,8 +7,8 @@ describe("operations", () => { type: operations.SCROLL_VERTICALLY, count: 10, }) as operations.ScrollVerticallyOperation; - expect(op.type).to.equal(operations.SCROLL_VERTICALLY); - expect(op.count).to.equal(10); + expect(op.type).toEqual(operations.SCROLL_VERTICALLY); + expect(op.count).toEqual(10); }); it("throws an Error on missing required parameter", () => { @@ -17,7 +16,7 @@ describe("operations", () => { operations.valueOf({ type: operations.SCROLL_VERTICALLY, }) - ).to.throw(TypeError); + ).toThrow(TypeError); }); it("fills default valus of optional parameter", () => { @@ -25,8 +24,8 @@ describe("operations", () => { type: operations.COMMAND_SHOW_OPEN, }) as operations.CommandShowOpenOperation; - expect(op.type).to.equal(operations.COMMAND_SHOW_OPEN); - expect(op.alter).to.be.false; + expect(op.type).toEqual(operations.COMMAND_SHOW_OPEN); + expect(op.alter).toBeFalsy; }); it("throws an Error on mismatch of parameter", () => { @@ -35,14 +34,14 @@ describe("operations", () => { type: operations.SCROLL_VERTICALLY, count: "10", }) - ).to.throw(TypeError); + ).toThrow(TypeError); expect(() => operations.valueOf({ type: operations.COMMAND_SHOW_OPEN, alter: "true", }) - ).to.throw(TypeError); + ).toThrow(TypeError); }); }); }); |