@@ -35,13 +35,16 @@ describe('api:request:rest NUT', () => {
3535 describe ( 'std out' , ( ) => {
3636 it ( 'get result in json format' , ( ) => {
3737 const result = execCmd ( "api request rest 'services/data/v56.0/limits'" ) . shellOutput . stdout ;
38+ console . warn ( 'res' , result ) ;
3839 // make sure we got a JSON object back
3940 expect ( Object . keys ( JSON . parse ( result ) as Record < string , unknown > ) ) . to . have . length ;
4041 } ) ;
4142
4243 it ( 'should pass headers' , ( ) => {
4344 const result = execCmd ( "api request rest 'services/data/v56.0/limits' -H 'Accept: application/xml'" ) . shellOutput
4445 . stdout ;
46+ console . log ( 'res' , result ) ;
47+
4548 // the headers will change this to xml
4649 expect ( result . startsWith ( '<?xml version="1.0" encoding="UTF-8"?><LimitsSnapshot>' ) ) . to . be . true ;
4750 } ) ;
@@ -51,6 +54,8 @@ describe('api:request:rest NUT', () => {
5154 it ( 'get result in json format' , ( ) => {
5255 const result = execCmd ( "api request rest 'services/data/v56.0/limits' --stream-to-file out.txt" ) . shellOutput
5356 . stdout ;
57+ console . log ( 'res' , result ) ;
58+
5459 expect ( result . trim ( ) ) . to . equal ( 'File saved to out.txt' ) ;
5560
5661 const content = readFileSync ( join ( testSession . project . dir , 'out.txt' ) , 'utf-8' ) ;
@@ -62,6 +67,8 @@ describe('api:request:rest NUT', () => {
6267 const result = execCmd (
6368 "api request rest 'services/data/v56.0/limits' -H 'Accept: application/xml' --stream-to-file out.txt"
6469 ) . shellOutput . stdout ;
70+ console . log ( 'res' , result ) ;
71+
6572 expect ( result . trim ( ) ) . to . equal ( 'File saved to out.txt' ) ;
6673
6774 const content = readFileSync ( join ( testSession . project . dir , 'out.txt' ) , 'utf-8' ) ;
0 commit comments