add logMessages testing helper
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { nextTick } from "node:process"
|
import { nextTick } from "node:process"
|
||||||
import { promisify } from "node:util"
|
import { promisify } from "node:util"
|
||||||
import type { ReactNode } from "react"
|
import type { ReactNode } from "react"
|
||||||
|
import { logPretty } from "../helpers/log-pretty"
|
||||||
import { omit } from "../helpers/omit"
|
import { omit } from "../helpers/omit"
|
||||||
import { Reacord } from "../library/main"
|
import { Reacord } from "../library/main"
|
||||||
import { TestAdapter, TestCommandInteraction } from "../library/testing"
|
import { TestAdapter, TestCommandInteraction } from "../library/testing"
|
||||||
@@ -25,12 +26,17 @@ export function setupReacordTesting() {
|
|||||||
await assertMessages(expected)
|
await assertMessages(expected)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function logMessages() {
|
||||||
|
logPretty(sampleMessages(adapter))
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
reacord,
|
reacord,
|
||||||
adapter,
|
adapter,
|
||||||
reply,
|
reply,
|
||||||
assertMessages,
|
assertMessages,
|
||||||
assertRender,
|
assertRender,
|
||||||
|
logMessages,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user