wip embeds

This commit is contained in:
MapleLeaf
2021-12-16 10:10:47 -06:00
parent b7a3be73ee
commit 803252290d
8 changed files with 88 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
import React from "react"
import { Embed } from "../src/components.js"
export function KitchenSink() {
return (
<>
content
<Embed color="BLUE"></Embed>
</>
)
}

View File

@@ -3,6 +3,7 @@ import test from "ava"
import { Client, TextChannel } from "discord.js"
import { nanoid } from "nanoid"
import React, { useState } from "react"
import { Embed } from "../src/components/embed.js"
import { raise } from "../src/helpers/raise.js"
import { createRoot } from "../src/root.js"
import { testBotToken, testChannelId } from "./test-environment.js"
@@ -32,7 +33,20 @@ test.after(() => {
client.destroy()
})
test("rendering text", async (t) => {
test.only("test", async (t) => {
const root = createRoot(channel)
await root.render(
<>
<Embed color="BLUE">
<Embed color="DARKER_GREY" />
</Embed>
<Embed color="DARKER_GREY" />
</>,
)
t.pass()
})
test("kitchen sink", async (t) => {
const root = createRoot(channel)
const content = nanoid()
@@ -50,7 +64,7 @@ test("rendering text", async (t) => {
await assertNoMessageHasContent(t, newContent)
})
test("rapid updates", async (t) => {
test("kitchen sink, rapid updates", async (t) => {
const root = createRoot(channel)
const content = nanoid()