11import fs from "node:fs" ;
2- import core from "@actions/core" ;
32import webapi from "@slack/web-api" ;
43import axios , { AxiosError } from "axios" ;
54import sinon from "sinon" ;
@@ -45,7 +44,18 @@ export class Mock {
4544 this . sandbox = sinon . createSandbox ( ) ;
4645 this . axios = this . sandbox . stub ( axios ) ;
4746 this . calls = this . sandbox . stub ( webapi . WebClient . prototype , "apiCall" ) ;
48- this . core = this . sandbox . stub ( core ) ;
47+ this . core = {
48+ debug : this . sandbox . stub ( ) ,
49+ error : this . sandbox . stub ( ) ,
50+ getInput : this . sandbox . stub ( ) ,
51+ getBooleanInput : this . sandbox . stub ( ) ,
52+ info : this . sandbox . stub ( ) ,
53+ isDebug : this . sandbox . stub ( ) ,
54+ setFailed : this . sandbox . stub ( ) ,
55+ setOutput : this . sandbox . stub ( ) ,
56+ setSecret : this . sandbox . stub ( ) ,
57+ warning : this . sandbox . stub ( ) ,
58+ } ;
4959 this . fs = this . sandbox . stub ( fs ) ;
5060 this . webapi = {
5161 WebClient : function ( ) {
@@ -65,7 +75,16 @@ export class Mock {
6575 this . sandbox . reset ( ) ;
6676 this . axios . post . resetHistory ( ) ;
6777 this . calls . resetHistory ( ) ;
78+ this . core . debug . reset ( ) ;
79+ this . core . error . reset ( ) ;
6880 this . core . getInput . reset ( ) ;
81+ this . core . getBooleanInput . reset ( ) ;
82+ this . core . info . reset ( ) ;
83+ this . core . isDebug . reset ( ) ;
84+ this . core . setFailed . reset ( ) ;
85+ this . core . setOutput . reset ( ) ;
86+ this . core . setSecret . reset ( ) ;
87+ this . core . warning . reset ( ) ;
6988 this . webapi = {
7089 WebClient : function ( ) {
7190 this . apiCall = ( ) => ( {
0 commit comments