@@ -146,13 +146,13 @@ const {
146146
147147// Unit test: don't import the real gateway just to check the prototype chain.
148148vi . mock ( "../internal/gateway.js" , ( ) => ( {
149- DISCORD_GATEWAY_WS_MAX_PAYLOAD_BYTES : 1024 * 1024 ,
149+ DISCORD_GATEWAY_WS_MAX_PAYLOAD_BYTES : 16 * 1024 * 1024 ,
150150 GatewayIntents,
151151 GatewayPlugin,
152152} ) ) ;
153153
154154vi . mock ( "../internal/gateway.js" , ( ) => ( {
155- DISCORD_GATEWAY_WS_MAX_PAYLOAD_BYTES : 1024 * 1024 ,
155+ DISCORD_GATEWAY_WS_MAX_PAYLOAD_BYTES : 16 * 1024 * 1024 ,
156156 GatewayIntents,
157157 GatewayPlugin,
158158} ) ) ;
@@ -400,7 +400,7 @@ describe("createDiscordGatewayPlugin", () => {
400400 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
401401 agent : getLastAgent ( ) ,
402402 handshakeTimeout : 30_000 ,
403- maxPayload : 1024 * 1024 ,
403+ maxPayload : 16 * 1024 * 1024 ,
404404 } ) ;
405405 expect ( wsProxyAgentSpy ) . not . toHaveBeenCalled ( ) ;
406406 } ) ;
@@ -518,7 +518,7 @@ describe("createDiscordGatewayPlugin", () => {
518518 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
519519 agent : getLastProxyAgent ( ) ,
520520 handshakeTimeout : 30_000 ,
521- maxPayload : 1024 * 1024 ,
521+ maxPayload : 16 * 1024 * 1024 ,
522522 } ) ;
523523 expect ( runtime . log ) . toHaveBeenCalledWith ( "discord: gateway proxy enabled" ) ;
524524 expect ( runtime . error ) . not . toHaveBeenCalled ( ) ;
@@ -541,7 +541,7 @@ describe("createDiscordGatewayPlugin", () => {
541541 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
542542 agent : getLastProxyAgent ( ) ,
543543 handshakeTimeout : 30_000 ,
544- maxPayload : 1024 * 1024 ,
544+ maxPayload : 16 * 1024 * 1024 ,
545545 } ) ;
546546 expect ( runtime . log ) . toHaveBeenCalledWith ( "discord: gateway proxy enabled" ) ;
547547 expect ( runtime . error ) . not . toHaveBeenCalled ( ) ;
@@ -564,7 +564,7 @@ describe("createDiscordGatewayPlugin", () => {
564564 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
565565 agent : getLastProxyAgent ( ) ,
566566 handshakeTimeout : 30_000 ,
567- maxPayload : 1024 * 1024 ,
567+ maxPayload : 16 * 1024 * 1024 ,
568568 } ) ;
569569 expect ( runtime . error ) . not . toHaveBeenCalled ( ) ;
570570 expect ( runtime . log ) . toHaveBeenCalledWith ( "discord: gateway proxy enabled" ) ;
@@ -586,7 +586,7 @@ describe("createDiscordGatewayPlugin", () => {
586586 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
587587 agent : getLastAgent ( ) ,
588588 handshakeTimeout : 30_000 ,
589- maxPayload : 1024 * 1024 ,
589+ maxPayload : 16 * 1024 * 1024 ,
590590 } ) ;
591591 expect ( runtime . log ) . not . toHaveBeenCalled ( ) ;
592592 } ) ;
@@ -607,7 +607,7 @@ describe("createDiscordGatewayPlugin", () => {
607607 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
608608 agent : getLastProxyAgent ( ) ,
609609 handshakeTimeout : 30_000 ,
610- maxPayload : 1024 * 1024 ,
610+ maxPayload : 16 * 1024 * 1024 ,
611611 } ) ;
612612 expect ( runtime . log ) . toHaveBeenCalledTimes ( 1 ) ;
613613 expect ( runtime . log ) . toHaveBeenCalledWith ( "discord: gateway proxy enabled" ) ;
@@ -699,7 +699,7 @@ describe("createDiscordGatewayPlugin", () => {
699699 expect ( webSocketSpy ) . toHaveBeenCalledWith ( "wss://gateway.discord.gg" , {
700700 agent : getLastProxyAgent ( ) ,
701701 handshakeTimeout : 30_000 ,
702- maxPayload : 1024 * 1024 ,
702+ maxPayload : 16 * 1024 * 1024 ,
703703 } ) ;
704704 expect ( runtime . error ) . not . toHaveBeenCalled ( ) ;
705705 expect ( runtime . log ) . toHaveBeenCalledWith ( "discord: gateway proxy enabled" ) ;
0 commit comments