@@ -123,6 +123,7 @@ describe("oasDiffChangelog", () => {
123123 consoleErrorSpy . restore ( ) ;
124124 } ) ;
125125 it ( "should return error code 2 when no exchange.json files are found" , async ( ) => {
126+ const consoleWarnSpy = sinon . spy ( console , "warn" ) ;
126127 const execStub = createMockExec ( ) ;
127128 const fsStub = createMockFs ( ) ;
128129
@@ -142,8 +143,10 @@ describe("oasDiffChangelog", () => {
142143 expect ( result ) . to . equal ( 2 ) ;
143144 expect ( consoleErrorSpy . called ) . to . be . true ;
144145 expect ( consoleErrorSpy . args [ 0 ] [ 0 ] . message ) . to . include (
145- "No exchange.json file found in leaf directory: base/api-v1 "
146+ "No exchange.json files found in any directory under : base"
146147 ) ;
148+
149+ consoleWarnSpy . restore ( ) ;
147150 } ) ;
148151
149152 it ( "should return error code 2 when no exchange.json files are found in entire directory tree" , async ( ) => {
@@ -163,7 +166,7 @@ describe("oasDiffChangelog", () => {
163166 expect ( result ) . to . equal ( 2 ) ;
164167 expect ( consoleErrorSpy . called ) . to . be . true ;
165168 expect ( consoleErrorSpy . args [ 0 ] [ 0 ] . message ) . to . include (
166- "No exchange.json file found in leaf directory: base. Each API directory must contain an exchange.json file."
169+ "No exchange.json files found in any directory under : base. Each API directory must contain an exchange.json file."
167170 ) ;
168171 } ) ;
169172
0 commit comments