@@ -8,12 +8,7 @@ import {
88} from "discord-api-types/v10" ;
99import { describe , expect , it , vi } from "vitest" ;
1010import { Container , TextDisplay } from "./components.js" ;
11- import {
12- BaseInteraction ,
13- ModalInteraction ,
14- createInteraction ,
15- type RawInteraction ,
16- } from "./interactions.js" ;
11+ import { ModalInteraction , createInteraction , type RawInteraction } from "./interactions.js" ;
1712import { Message } from "./structures.js" ;
1813import {
1914 attachRestMock ,
@@ -29,7 +24,7 @@ describe("BaseInteraction", () => {
2924 const patch = vi . fn ( async ( ) => undefined ) ;
3025 const client = createInternalTestClient ( ) ;
3126 attachRestMock ( client , { patch, post } ) ;
32- const interaction = new BaseInteraction (
27+ const interaction = createInteraction (
3328 client ,
3429 createInternalInteractionPayload ( { id : "interaction1" , token : "token1" } ) ,
3530 ) ;
@@ -52,7 +47,7 @@ describe("BaseInteraction", () => {
5247 const post = vi . fn ( async ( ) => undefined ) ;
5348 const client = createInternalTestClient ( ) ;
5449 attachRestMock ( client , { post } ) ;
55- const interaction = new BaseInteraction (
50+ const interaction = createInteraction (
5651 client ,
5752 createInternalInteractionPayload ( { id : "interaction1" , token : "token1" } ) ,
5853 ) ;
@@ -85,7 +80,7 @@ describe("BaseInteraction", () => {
8580 const patch = vi . fn ( async ( ) => undefined ) ;
8681 const client = createInternalTestClient ( ) ;
8782 attachRestMock ( client , { patch, post } ) ;
88- const interaction = new BaseInteraction (
83+ const interaction = createInteraction (
8984 client ,
9085 createInternalInteractionPayload ( { id : "interaction1" , token : "token1" } ) ,
9186 ) ;
@@ -199,7 +194,7 @@ describe("BaseInteraction", () => {
199194 const post = vi . fn ( async ( ) => undefined ) ;
200195 const client = createInternalTestClient ( ) ;
201196 attachRestMock ( client , { get, post } ) ;
202- const interaction = new BaseInteraction (
197+ const interaction = createInteraction (
203198 client ,
204199 createInternalInteractionPayload ( { id : "interaction1" , token : "token1" } ) ,
205200 ) ;
0 commit comments