@@ -73,9 +73,14 @@ describe("breaking-change-add-label-artifacts", () => {
73
73
createMockWorkflowRun ( CROSS_VERSION_BREAKING_CHANGE_WORKFLOW_NAME , "completed" , "success" , 2 ) ,
74
74
] ;
75
75
76
- const expectStandardOutputs = ( breakingChangeValue , versioningValue ) => {
76
+ const expectRequiredOutputs = ( ) => {
77
77
expect ( mockCore . setOutput ) . toHaveBeenCalledWith ( "head_sha" , mockInputs . head_sha ) ;
78
78
expect ( mockCore . setOutput ) . toHaveBeenCalledWith ( "issue_number" , mockInputs . issue_number ) ;
79
+ } ;
80
+
81
+ const expectStandardOutputs = ( breakingChangeValue , versioningValue ) => {
82
+ expectRequiredOutputs ( ) ;
83
+
79
84
expect ( mockCore . setOutput ) . toHaveBeenCalledWith (
80
85
"breakingChangeReviewLabelName" ,
81
86
REVIEW_REQUIRED_LABELS . BREAKING_CHANGE ,
@@ -92,9 +97,13 @@ describe("breaking-change-add-label-artifacts", () => {
92
97
} ;
93
98
94
99
const expectEarlyReturn = ( infoMessage ) => {
100
+ expectRequiredOutputs ( ) ;
101
+
102
+ // Ensure setOutput was *only* called with the two required outputs
103
+ expect ( mockCore . setOutput ) . toHaveBeenCalledTimes ( 2 ) ;
104
+
95
105
expect ( mockCore . info ) . toHaveBeenCalledWith ( infoMessage ) ;
96
106
expect ( mockGithub . rest . actions . listWorkflowRunArtifacts ) . not . toHaveBeenCalled ( ) ;
97
- expect ( mockCore . setOutput ) . not . toHaveBeenCalled ( ) ;
98
107
} ;
99
108
100
109
describe ( "successful execution with both workflows completed" , ( ) => {
0 commit comments