test: isolate discord model picker dispatch mock

This commit is contained in:
Peter Steinberger
2026-04-09 08:04:46 +01:00
parent 5ece17a865
commit 03d056989a

View File

@@ -248,9 +248,9 @@ function createBoundThreadBindingManager(params: {
function createDispatchSpy() {
const dispatchSpy = vi
.spyOn(dispatcherModule, "dispatchReplyWithDispatcher")
.fn<typeof dispatcherModule.dispatchReplyWithDispatcher>()
.mockResolvedValue({} as never);
nativeCommandTesting.setDispatchReplyWithDispatcher(dispatcherModule.dispatchReplyWithDispatcher);
nativeCommandTesting.setDispatchReplyWithDispatcher(dispatchSpy);
return dispatchSpy;
}