3
3
const { describe, test, spyOn, expect, beforeEach, afterEach} = require ( 'bun:test' ) ;
4
4
const assert = require ( 'node:assert' ) ;
5
5
6
- const { OutputResponse} = require ( '../../../../../js/ ' ) . bun . server ;
6
+ const { OutputResponse} = require ( '../../../../../js' ) . bun . server ;
7
7
8
8
9
9
const testOptions = {
@@ -112,7 +112,7 @@ describe('OutputResponse', () => {
112
112
diagnosticOptions . spy . diagnosticStatusCode = spyOn ( diagnosticOptions , 'diagnosticStatusCode' ) ;
113
113
114
114
assert . throws ( ( ) => new OutputResponse ( diagnosticOptions ) . flush ( ) ,
115
- { message : 'statusCode error' , cause : 'INVALID_RESPONSE' } ) ;
115
+ { message : 'statusCode error' } ) ;
116
116
117
117
expect ( diagnosticOptions . spy . diagnosticBody ) . toHaveBeenCalledTimes ( 0 ) ;
118
118
expect ( diagnosticOptions . spy . diagnosticStatusCode ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -126,7 +126,7 @@ describe('OutputResponse', () => {
126
126
diagnosticOptions . spy . diagnosticHeaders = spyOn ( diagnosticOptions , 'diagnosticHeaders' ) ;
127
127
128
128
assert . throws ( ( ) => new OutputResponse ( diagnosticOptions ) . flush ( ) ,
129
- { message : 'headers error' , cause : 'INVALID_RESPONSE' } ) ;
129
+ { message : 'headers error' } ) ;
130
130
131
131
expect ( diagnosticOptions . spy . diagnosticBody ) . toHaveBeenCalledTimes ( 0 ) ;
132
132
expect ( diagnosticOptions . spy . diagnosticStatusCode ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -140,7 +140,7 @@ describe('OutputResponse', () => {
140
140
diagnosticOptions . spy . diagnosticBody = spyOn ( diagnosticOptions , 'diagnosticBody' ) ;
141
141
142
142
assert . throws ( ( ) => new OutputResponse ( diagnosticOptions ) . flush ( ) ,
143
- { message : 'body error' , cause : 'INVALID_RESPONSE' } ) ;
143
+ { message : 'body error' } ) ;
144
144
145
145
expect ( diagnosticOptions . spy . diagnosticBody ) . toHaveBeenCalledTimes ( 1 ) ;
146
146
expect ( diagnosticOptions . spy . diagnosticStatusCode ) . toHaveBeenCalledTimes ( 1 ) ;
0 commit comments