@@ -114,12 +114,22 @@ describe('getFStreamUrl with category', function () {
114114 } ) ;
115115} ) ;
116116
117- describe ( 'Demo mode ignores category (uses legacy URLs)' , function ( ) {
118- it ( 'getFStreamSingleUrl returns demo URL regardless of category' , function ( ) {
119- assert . equal ( demoBinance . getFStreamSingleUrl ( 'market' ) , 'wss://fstream.binancefuture.com/ws/' ) ;
120- } ) ;
121- it ( 'getFStreamUrl returns demo URL regardless of category' , function ( ) {
122- assert . equal ( demoBinance . getFStreamUrl ( 'market' ) , 'wss://fstream.binancefuture.com/stream?streams=' ) ;
117+ describe ( 'Demo mode uses category-based URLs' , function ( ) {
118+ it ( 'getFStreamSingleUrl returns demo URL with category' , function ( ) {
119+ assert . equal ( demoBinance . getFStreamSingleUrl ( 'public' ) , 'wss://fstream.binancefuture.com/public/ws/' ) ;
120+ assert . equal ( demoBinance . getFStreamSingleUrl ( 'market' ) , 'wss://fstream.binancefuture.com/market/ws/' ) ;
121+ assert . equal ( demoBinance . getFStreamSingleUrl ( 'private' ) , 'wss://fstream.binancefuture.com/private/ws/' ) ;
122+ } ) ;
123+ it ( 'getFStreamUrl returns demo URL with category' , function ( ) {
124+ assert . equal ( demoBinance . getFStreamUrl ( 'public' ) , 'wss://fstream.binancefuture.com/public/stream?streams=' ) ;
125+ assert . equal ( demoBinance . getFStreamUrl ( 'market' ) , 'wss://fstream.binancefuture.com/market/stream?streams=' ) ;
126+ assert . equal ( demoBinance . getFStreamUrl ( 'private' ) , 'wss://fstream.binancefuture.com/private/stream?streams=' ) ;
127+ } ) ;
128+ it ( 'getFStreamSingleUrl returns legacy demo URL without category' , function ( ) {
129+ assert . equal ( demoBinance . getFStreamSingleUrl ( ) , 'wss://fstream.binancefuture.com/ws/' ) ;
130+ } ) ;
131+ it ( 'getFStreamUrl returns legacy demo URL without category' , function ( ) {
132+ assert . equal ( demoBinance . getFStreamUrl ( ) , 'wss://fstream.binancefuture.com/stream?streams=' ) ;
123133 } ) ;
124134} ) ;
125135
0 commit comments