11/**
22 * Configuration for a WebSocket message mock
33 */
4- export interface WebSocketMessageMock {
4+ export type WebSocketMessageMock = {
55 /** String(s) that the message should include to trigger this mock */
66 messageIncludes : string | string [ ] ;
77 /** The JSON response to send back */
@@ -10,7 +10,7 @@ export interface WebSocketMessageMock {
1010 delay ?: number ;
1111 /** Custom log message for this mock */
1212 logMessage ?: string ;
13- }
13+ } ;
1414
1515export const DEFAULT_SOLANA_WS_MOCKS : WebSocketMessageMock [ ] = [
1616 {
@@ -27,27 +27,36 @@ export const DEFAULT_SOLANA_WS_MOCKS: WebSocketMessageMock[] = [
2727 messageIncludes : 'accountSubscribe' ,
2828 response : {
2929 jsonrpc : '2.0' ,
30- result : 'b07ebf7caf2238a9b604d4dfcaf1934280fcd347d6eded62bc0def6cbb767d11' ,
30+ result :
31+ 'b07ebf7caf2238a9b604d4dfcaf1934280fcd347d6eded62bc0def6cbb767d11' ,
3132 id : '1' ,
3233 } ,
3334 delay : 500 ,
3435 logMessage : 'Account subscribe message received from client' ,
3536 } ,
3637 {
37- messageIncludes : [ 'programSubscribe' , 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' ] ,
38+ messageIncludes : [
39+ 'programSubscribe' ,
40+ 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' ,
41+ ] ,
3842 response : {
3943 jsonrpc : '2.0' ,
40- result : '568eafd45635c108d0d426361143de125a841628a58679f5a024cbab9a20b41c' ,
44+ result :
45+ '568eafd45635c108d0d426361143de125a841628a58679f5a024cbab9a20b41c' ,
4146 id : '1' ,
4247 } ,
4348 delay : 500 ,
4449 logMessage : 'Program subscribe message received from client' ,
4550 } ,
4651 {
47- messageIncludes : [ 'programSubscribe' , 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' ] ,
52+ messageIncludes : [
53+ 'programSubscribe' ,
54+ 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb' ,
55+ ] ,
4856 response : {
4957 jsonrpc : '2.0' ,
50- result : 'f33dd9975158af47bf16c7f6062a73191d4595c59cfec605d5a51e25c65ffb51' ,
58+ result :
59+ 'f33dd9975158af47bf16c7f6062a73191d4595c59cfec605d5a51e25c65ffb51' ,
5160 id : '1' ,
5261 } ,
5362 delay : 500 ,
0 commit comments