diff options
Diffstat (limited to 'test/settings/components/ui/Text.test.tsx')
-rw-r--r-- | test/settings/components/ui/Text.test.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/settings/components/ui/Text.test.tsx b/test/settings/components/ui/Text.test.tsx index 86c4132..a8e0bf9 100644 --- a/test/settings/components/ui/Text.test.tsx +++ b/test/settings/components/ui/Text.test.tsx @@ -6,7 +6,6 @@ import React from "react"; import ReactDOM from "react-dom"; import ReactTestUtils from "react-dom/test-utils"; import Text from "../../../../src/settings/components/ui/Text"; -import { expect } from "chai"; describe("settings/ui/Text", () => { let container: HTMLDivElement; @@ -30,10 +29,10 @@ describe("settings/ui/Text", () => { const label = document.querySelector("label")!; const input = document.querySelector("input")!; - expect(label.textContent).to.contain("myfield"); - expect(input.type).to.contain("text"); - expect(input.name).to.contain("myname"); - expect(input.value).to.contain("myvalue"); + expect(label.textContent?.includes("myfield")).toBeTruthy; + expect(input.type).toEqual("text"); + expect(input.name).toEqual("myname"); + expect(input.value).toEqual("myvalue"); }); it("invoke onChange", (done) => { @@ -44,7 +43,7 @@ describe("settings/ui/Text", () => { label="myfield" value="myvalue" onChange={(e) => { - expect((e.target as HTMLInputElement).value).to.equal("newvalue"); + expect((e.target as HTMLInputElement).value).toEqual("newvalue"); done(); }} />, |