fix linter warnings

This commit is contained in:
itsMapleLeaf
2022-07-23 13:29:52 -05:00
committed by Darius
parent 4f9fb4310f
commit 35d7f0b33f
2 changed files with 14 additions and 14 deletions

View File

@@ -35,7 +35,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("show embed").click() await tester.findButtonByLabel("show embed").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 0", content: "count: 0",
@@ -62,7 +62,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("clicc").click() await tester.findButtonByLabel("clicc").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 1", content: "count: 1",
@@ -94,7 +94,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("clicc").click() await tester.findButtonByLabel("clicc").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 2", content: "count: 2",
@@ -126,7 +126,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("hide embed").click() await tester.findButtonByLabel("hide embed").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 2", content: "count: 2",
@@ -153,7 +153,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("clicc").click() await tester.findButtonByLabel("clicc").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 3", content: "count: 3",
@@ -180,7 +180,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("deactivate").click() await tester.findButtonByLabel("deactivate").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 3", content: "count: 3",
@@ -210,7 +210,7 @@ test("rendering behavior", async () => {
}, },
]) ])
tester.findButtonByLabel("clicc").click() await tester.findButtonByLabel("clicc").click()
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "count: 3", content: "count: 3",

View File

@@ -59,16 +59,16 @@ test("single select", async () => {
await assertSelect([]) await assertSelect([])
expect(onSelect).toHaveBeenCalledTimes(0) expect(onSelect).toHaveBeenCalledTimes(0)
tester.findSelectByPlaceholder("choose one").select("2") await tester.findSelectByPlaceholder("choose one").select("2")
await assertSelect(["2"]) await assertSelect(["2"])
expect(onSelect).toHaveBeenCalledWith( expect(onSelect).toHaveBeenCalledWith(
expect.objectContaining({ values: ["2"] }), expect.objectContaining({ values: ["2"] }),
) )
tester.findButtonByLabel("disable").click() await tester.findButtonByLabel("disable").click()
await assertSelect(["2"], true) await assertSelect(["2"], true)
tester.findSelectByPlaceholder("choose one").select("1") await tester.findSelectByPlaceholder("choose one").select("1")
await assertSelect(["2"], true) await assertSelect(["2"], true)
expect(onSelect).toHaveBeenCalledTimes(1) expect(onSelect).toHaveBeenCalledTimes(1)
}) })
@@ -125,19 +125,19 @@ test("multiple select", async () => {
await assertSelect([]) await assertSelect([])
expect(onSelect).toHaveBeenCalledTimes(0) expect(onSelect).toHaveBeenCalledTimes(0)
tester.findSelectByPlaceholder("select").select("1", "3") await tester.findSelectByPlaceholder("select").select("1", "3")
await assertSelect(expect.arrayContaining(["1", "3"]) as unknown as string[]) await assertSelect(expect.arrayContaining(["1", "3"]) as unknown as string[])
expect(onSelect).toHaveBeenCalledWith( expect(onSelect).toHaveBeenCalledWith(
expect.objectContaining({ values: expect.arrayContaining(["1", "3"]) }), expect.objectContaining({ values: expect.arrayContaining(["1", "3"]) }),
) )
tester.findSelectByPlaceholder("select").select("2") await tester.findSelectByPlaceholder("select").select("2")
await assertSelect(expect.arrayContaining(["2"]) as unknown as string[]) await assertSelect(expect.arrayContaining(["2"]) as unknown as string[])
expect(onSelect).toHaveBeenCalledWith( expect(onSelect).toHaveBeenCalledWith(
expect.objectContaining({ values: expect.arrayContaining(["2"]) }), expect.objectContaining({ values: expect.arrayContaining(["2"]) }),
) )
tester.findSelectByPlaceholder("select").select() await tester.findSelectByPlaceholder("select").select()
await assertSelect([]) await assertSelect([])
expect(onSelect).toHaveBeenCalledWith(expect.objectContaining({ values: [] })) expect(onSelect).toHaveBeenCalledWith(expect.objectContaining({ values: [] }))
}) })
@@ -145,7 +145,7 @@ test("multiple select", async () => {
test("optional onSelect + unknown value", async () => { test("optional onSelect + unknown value", async () => {
const tester = new ReacordTester() const tester = new ReacordTester()
tester.reply().render(<Select placeholder="select" />) tester.reply().render(<Select placeholder="select" />)
tester.findSelectByPlaceholder("select").select("something") await tester.findSelectByPlaceholder("select").select("something")
await tester.assertMessages([ await tester.assertMessages([
{ {
content: "", content: "",