@@ -157,7 +157,7 @@ describe("Connection snippetUtils", function () {
157157
158158 assert . include ( bs . options . get ( "snippet" ) , "<script async id=\"__bs_script__\" src=\"http://localhost:3000/browser-sync" ) ;
159159
160- var expected = "___browserSync___.io( 'http://localhost:3000/browser-sync'" ;
160+ var expected = "___browserSync___.url = 'http://localhost:3000/browser-sync'" ;
161161
162162 req ( bs . server )
163163 . get ( bs . options . getIn ( [ "scriptPaths" , "path" ] ) )
@@ -180,7 +180,7 @@ describe("Connection snippetUtils", function () {
180180 var port = bs . options . get ( "port" ) ;
181181 assert . include ( bs . options . get ( "snippet" ) , "<script async id=\"__bs_script__\" src=\"http://localhost:" + port + "/browser-sync" ) ;
182182
183- var expected = "___browserSync___.io( 'http://localhost:" + port + "/browser-sync'" ;
183+ var expected = "___browserSync___.url = 'http://localhost:" + port + "/browser-sync'" ;
184184
185185 req ( bs . server )
186186 . get ( bs . options . getIn ( [ "scriptPaths" , "path" ] ) )
@@ -231,12 +231,14 @@ describe("Connection snippetUtils", function () {
231231 domain : "http://localhost:{port}"
232232 }
233233 } , function ( err , bs ) {
234+ var port = bs . options . get ( "port" ) ;
234235 req ( bs . server )
235236 . get ( bs . options . getIn ( [ "scriptPaths" , "path" ] ) )
236237 . expect ( 200 )
237238 . end ( function ( err , res ) {
238- // console.log(res.text)
239- assert . ok ( res . text . match ( / i o \( ' h t t p : \/ \/ l o c a l h o s t : \d { 4 , 5 } \/ b r o w s e r - s y n c / ) ) ;
239+
240+ var expected = "___browserSync___.url = 'http://localhost:" + port + "/browser-sync'" ;
241+ assert . include ( res . text , expected ) ;
240242 bs . cleanup ( ) ;
241243 done ( ) ;
242244 } ) ;
0 commit comments