Skip to main content
@wolfstar/http-framework-test-utils dispatches Discord interaction payloads through a testable client. Tests exercise the real router and command classes without opening a port or calling Discord.

Install

Register Matchers

Add the package’s optional Vitest entry point to your setup file:

Create a Harness

Choose the Right Assertion

toHaveJsonBody compares every nested key. Prefer toMatchObject when the interaction response contains unrelated metadata.

Available Fixtures

The package provides fixtures for chat-input, user, and message commands; autocomplete; buttons; every select-menu variant; and modal submissions. Base user, guild member, message, and interaction data are also exported for composing custom payloads. Read the package guide for helper utilities and the generated API reference for fixture types.