@@ -22,8 +22,9 @@ describe('Invalid Usage', () => {
22
22
} )
23
23
24
24
it ( 'Fails on invalid action input' , async ( ) => {
25
+ jest . spyOn ( core , 'error' ) . mockImplementation ( )
25
26
jest . spyOn ( core , 'getInput' ) . mockImplementation ( addLabelInvalidInput )
26
- jest . spyOn ( core , 'setFailed' )
27
+ jest . spyOn ( core , 'setFailed' ) . mockImplementation ( )
27
28
28
29
const { run } = require ( '../src/index' )
29
30
await run ( )
@@ -64,8 +65,8 @@ describe('Add Labels', () => {
64
65
65
66
it ( 'Fails on GitHub API error' , async ( ) => {
66
67
jest . spyOn ( core , 'getInput' ) . mockImplementation ( addLabelValidInput )
67
- jest . spyOn ( core , 'error' )
68
- jest . spyOn ( core , 'setFailed' )
68
+ jest . spyOn ( core , 'error' ) . mockImplementation ( )
69
+ jest . spyOn ( core , 'setFailed' ) . mockImplementation ( )
69
70
70
71
jest . spyOn ( require ( '@octokit/rest' ) , 'Octokit' ) . mockImplementation ( ( ) => {
71
72
return {
@@ -95,7 +96,7 @@ describe('Add Labels', () => {
95
96
96
97
it ( 'Creates missing labels on 404 errors' , async ( ) => {
97
98
jest . spyOn ( core , 'getInput' ) . mockImplementation ( addLabelValidInput )
98
- jest . spyOn ( core , 'info' )
99
+ jest . spyOn ( core , 'info' ) . mockImplementation ( )
99
100
jest . spyOn ( Math , 'random' ) . mockReturnValue ( 0.5 )
100
101
101
102
const mocktokit = {
@@ -154,7 +155,7 @@ describe('Remove Labels', () => {
154
155
155
156
it ( 'Removes valid labels' , async ( ) => {
156
157
jest . spyOn ( core , 'getInput' ) . mockImplementation ( removeLabelValidInput )
157
- jest . spyOn ( core , 'info' )
158
+ jest . spyOn ( core , 'info' ) . mockImplementation ( )
158
159
159
160
const mocktokit = {
160
161
rest : {
@@ -190,7 +191,7 @@ describe('Remove Labels', () => {
190
191
191
192
it ( 'Skips removing missing labels' , async ( ) => {
192
193
jest . spyOn ( core , 'getInput' ) . mockImplementation ( removeLabelValidInput )
193
- jest . spyOn ( core , 'setFailed' )
194
+ jest . spyOn ( core , 'setFailed' ) . mockImplementation ( )
194
195
195
196
const mocktokit = {
196
197
rest : {
@@ -221,7 +222,7 @@ describe('Remove Labels', () => {
221
222
222
223
it ( 'Fails on GitHub API error' , async ( ) => {
223
224
jest . spyOn ( core , 'getInput' ) . mockImplementation ( removeLabelValidInput )
224
- jest . spyOn ( core , 'setFailed' )
225
+ jest . spyOn ( core , 'setFailed' ) . mockImplementation ( )
225
226
226
227
const mocktokit = {
227
228
rest : {
0 commit comments