add channel renderer + try to simplify adapter generics

This commit is contained in:
MapleLeaf
2021-12-27 19:22:21 -06:00
parent 6bfb1ab6de
commit 3682f67bfe
13 changed files with 143 additions and 43 deletions

View File

@@ -9,9 +9,9 @@ import { TestAdapter, TestCommandInteraction } from "../library/testing"
const nextTickPromise = promisify(nextTick)
export function setupReacordTesting() {
const adapter = new TestAdapter()
const adapter = TestAdapter.create()
const reacord = new Reacord({ adapter })
const reply = reacord.createCommandReply(new TestCommandInteraction(adapter))
const reply = reacord.reply(new TestCommandInteraction(adapter))
async function assertMessages(expected: ReturnType<typeof sampleMessages>) {
await nextTickPromise() // wait for the render to complete