diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-09-26 17:01:31 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-09-26 17:23:14 +0900 |
commit | e304581fb15eabb3a973d363a282ee7546561e01 (patch) | |
tree | 1afb21a2dee2ada3d10c1417fa61c0aae1f83077 /test/shared/settings/Search.test.ts | |
parent | 11d6d725eee2ac0a1c16e4c7a4ce4f296bb6b016 (diff) |
Do not use chai on unit test
Diffstat (limited to 'test/shared/settings/Search.test.ts')
-rw-r--r-- | test/shared/settings/Search.test.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/shared/settings/Search.test.ts b/test/shared/settings/Search.test.ts index 1feb14b..5d2f8d5 100644 --- a/test/shared/settings/Search.test.ts +++ b/test/shared/settings/Search.test.ts @@ -1,5 +1,4 @@ import Search from "../../../src/shared/settings/Search"; -import { expect } from "chai"; describe("Search", () => { it("returns search settings by valid settings", () => { @@ -11,12 +10,12 @@ describe("Search", () => { }, }); - expect(search.defaultEngine).to.equal("google"); - expect(search.engines).to.deep.equals({ + expect(search.defaultEngine).toEqual("google"); + expect(search.engines).toEqual({ google: "https://google.com/search?q={}", yahoo: "https://search.yahoo.com/search?p={}", }); - expect(search.toJSON()).to.deep.equal({ + expect(search.toJSON()).toEqual({ default: "google", engines: { google: "https://google.com/search?q={}", @@ -34,7 +33,7 @@ describe("Search", () => { yahoo: "https://search.yahoo.com/search?p={}", }, }) - ).to.throw(TypeError); + ).toThrow(TypeError); expect(() => Search.fromJSON({ default: "g o o g l e", @@ -42,7 +41,7 @@ describe("Search", () => { "g o o g l e": "https://google.com/search?q={}", }, }) - ).to.throw(TypeError); + ).toThrow(TypeError); expect(() => Search.fromJSON({ default: "google", @@ -50,7 +49,7 @@ describe("Search", () => { google: "https://google.com/search", }, }) - ).to.throw(TypeError); + ).toThrow(TypeError); expect(() => Search.fromJSON({ default: "google", @@ -58,6 +57,6 @@ describe("Search", () => { google: "https://google.com/search?q={}&r={}", }, }) - ).to.throw(TypeError); + ).toThrow(TypeError); }); }); |