diff options
Diffstat (limited to 'test/settings/components/ui/Radio.test.tsx')
-rw-r--r-- | test/settings/components/ui/Radio.test.tsx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/settings/components/ui/Radio.test.tsx b/test/settings/components/ui/Radio.test.tsx index f929ee3..e2bf214 100644 --- a/test/settings/components/ui/Radio.test.tsx +++ b/test/settings/components/ui/Radio.test.tsx @@ -1,8 +1,11 @@ +/** + * @jest-environment jsdom + */ + import React from "react"; import ReactDOM from "react-dom"; import ReactTestUtils from "react-dom/test-utils"; import Radio from "../../../../src/settings/components/ui/Radio"; -import { expect } from "chai"; describe("settings/ui/Radio", () => { let container: HTMLDivElement; @@ -26,10 +29,10 @@ describe("settings/ui/Radio", () => { const label = document.querySelector("label")!; const input = document.querySelector("input")!; - expect(label.textContent).to.contain("myfield"); - expect(input.type).to.contain("radio"); - expect(input.name).to.contain("myradio"); - expect(input.value).to.contain("myvalue"); + expect(label.textContent).toEqual("myfield"); + expect(input.type).toEqual("radio"); + expect(input.name).toEqual("myradio"); + expect(input.value).toEqual("myvalue"); }); it("invoke onChange", (done) => { @@ -41,7 +44,7 @@ describe("settings/ui/Radio", () => { label="myfield" value="myvalue" onChange={(e) => { - expect((e.target as HTMLInputElement).checked).to.be.true; + expect((e.target as HTMLInputElement).checked).toBeTruthy; done(); }} />, |