File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11import { ConnectionStatus , QueueingStreamingSocket } from "./queueingstreamingsocket" ;
22
33function pendingWithoutSocketServer ( ) : void {
4- if ( ! process . env . SOCKETSERVER_ENABLED ) {
5- pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
4+ if ( typeof process !== "undefined" && process ? .env . SOCKETSERVER_ENABLED ) {
5+ return ;
66 }
7+ pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
78}
89
910describe ( "QueueingStreamingSocket" , ( ) => {
Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ const getExec = async (): Promise<Exec | undefined> => {
1212} ;
1313
1414function pendingWithoutSocketServer ( ) : void {
15- if ( ! process . env . SOCKETSERVER_ENABLED ) {
16- pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
15+ if ( typeof process !== "undefined" && process ? .env . SOCKETSERVER_ENABLED ) {
16+ return ;
1717 }
18+ pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
1819}
1920
2021describe ( "ReconnectingSocket" , ( ) => {
Original file line number Diff line number Diff line change 11import { SocketWrapper } from "./socketwrapper" ;
22
33function pendingWithoutSocketServer ( ) : void {
4- if ( ! process . env . SOCKETSERVER_ENABLED ) {
5- pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
4+ if ( typeof process !== "undefined" && process ? .env . SOCKETSERVER_ENABLED ) {
5+ return ;
66 }
7+ pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
78}
89
910describe ( "SocketWrapper" , ( ) => {
Original file line number Diff line number Diff line change @@ -2,14 +2,11 @@ import { toListPromise } from "@cosmjs/stream";
22
33import { StreamingSocket } from "./streamingsocket" ;
44
5- function skipTests ( ) : boolean {
6- return ! process . env . SOCKETSERVER_ENABLED ;
7- }
8-
95function pendingWithoutSocketServer ( ) : void {
10- if ( skipTests ( ) ) {
11- pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
6+ if ( typeof process !== "undefined" && process ?. env . SOCKETSERVER_ENABLED ) {
7+ return ;
128 }
9+ pending ( "Set SOCKETSERVER_ENABLED to enable socket tests" ) ;
1310}
1411
1512describe ( "StreamingSocket" , ( ) => {
You can’t perform that action at this time.
0 commit comments