File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
packages/cli/test/unit/lib/run Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -37,18 +37,10 @@ describe('logDisplayer', function () {
37
37
public readyState : number = 0 // CONNECTING
38
38
public url : string
39
39
private errorCode : number
40
- private static instanceCount = 0
41
40
42
41
constructor ( url : string , options ?: any ) {
43
42
this . url = url
44
- MockEventSource . instanceCount ++
45
-
46
- // Determine error code based on URL or other factors
47
- if ( url . includes ( 'telemetry.heroku.com' ) ) {
48
- this . errorCode = 401 // Default for Cedar app tests
49
- } else {
50
- this . errorCode = 401 // Default for Cedar app tests
51
- }
43
+ this . errorCode = 401
52
44
53
45
// Simulate connection attempt
54
46
setTimeout ( ( ) => {
@@ -345,7 +337,7 @@ describe('logDisplayer', function () {
345
337
} ) . get ( '/apps/my-fir-app' )
346
338
. reply ( 200 , firApp )
347
339
. post ( '/apps/my-fir-app/log-sessions' )
348
- . reply ( 500 , { message : 'Internal Server Error' } )
340
+ . reply ( 500 )
349
341
} )
350
342
351
343
afterEach ( function ( ) {
@@ -364,7 +356,7 @@ describe('logDisplayer', function () {
364
356
stdout . stop ( )
365
357
stderr . stop ( )
366
358
const { message} = error as Error
367
- expect ( message . trim ( ) ) . to . equal ( 'Internal Server Error' )
359
+ expect ( message . trim ( ) ) . to . equal ( 'HTTP Error 500 for POST https://api.heroku.com/apps/my-fir-app/log-sessions ' )
368
360
}
369
361
370
362
// it displays message about fetching logs for fir apps
You can’t perform that action at this time.
0 commit comments