@@ -10,7 +10,6 @@ jest.mock("@actions/core", () => ({
1010 summary : {
1111 addHeading : jest . fn ( ) . mockReturnThis ( ) ,
1212 addRaw : jest . fn ( ) . mockReturnThis ( ) ,
13- write : jest . fn ( ) . mockReturnThis ( ) ,
1413 } ,
1514} ) ) ;
1615
@@ -141,7 +140,7 @@ describe("Artifact Processing Tests", () => {
141140 it ( "should write test results data to the GitHub job summary" , ( ) => {
142141 if ( testResultsData ) {
143142 const actionName = process . env . GITHUB_ACTION || "" ;
144- testResultsSummary . writeSummary ( testResultsData , actionName ) ;
143+ testResultsSummary . addSummary ( testResultsData , actionName ) ;
145144
146145 expect ( core . summary . addHeading ) . toHaveBeenCalledTimes ( 2 ) ;
147146 expect ( core . summary . addHeading ) . toHaveBeenNthCalledWith (
@@ -165,7 +164,6 @@ describe("Artifact Processing Tests", () => {
165164 expect ( core . summary . addHeading ) . toHaveBeenNthCalledWith ( 2 , "All tests" , 3 ) ;
166165
167166 expect ( core . summary . addRaw ) . toHaveBeenCalledTimes ( 2 ) ;
168- expect ( core . summary . write ) . toHaveBeenCalledTimes ( 1 ) ;
169167 }
170168 } ) ;
171169} ) ;
@@ -322,7 +320,7 @@ describe("HTML Structure Tests", () => {
322320} ) ;
323321
324322describe ( "Error Handling Tests" , ( ) => {
325- it ( "should handle errors gracefully in writeSummary " , ( ) => {
323+ it ( "should handle errors gracefully in addSummary " , ( ) => {
326324 const consoleSpy = jest . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } ) ;
327325
328326 // Mock addHeading to throw an error
@@ -346,7 +344,7 @@ describe("Error Handling Tests", () => {
346344
347345 // This should not throw, but should log the error
348346 expect ( ( ) => {
349- testResultsSummary . writeSummary ( mockTestResultsData , "mockAction" ) ;
347+ testResultsSummary . addSummary ( mockTestResultsData , "mockAction" ) ;
350348 } ) . not . toThrow ( ) ;
351349
352350 // Verify error was logged
0 commit comments