@@ -6,11 +6,11 @@ import * as main from '../src/main'
66import * as codeartifact from '../src/codeartifact'
77
88// Mock the GitHub Actions core library
9- let infoMock : jest . SpyInstance
10- let getInputMock : jest . SpyInstance
11- let setFailedMock : jest . SpyInstance
12- let setOutputMock : jest . SpyInstance
13- let getTokenMock : jest . SpyInstance
9+ let infoMock : jest . SpiedFunction < typeof core . info >
10+ let getInputMock : jest . SpiedFunction < typeof core . getInput >
11+ let setFailedMock : jest . SpiedFunction < typeof core . setFailed >
12+ let setOutputMock : jest . SpiedFunction < typeof core . setOutput >
13+ let getTokenMock : jest . SpiedFunction < typeof codeartifact . getToken >
1414
1515// Mock the action's main function
1616const runMock = jest . spyOn ( main , 'run' )
@@ -31,7 +31,7 @@ describe('action', () => {
3131
3232 it ( 'sets the token output' , async ( ) => {
3333 // Set the action's inputs as return values from core.getInput()
34- getInputMock . mockImplementation ( ( name : string ) => {
34+ getInputMock . mockImplementation ( name => {
3535 switch ( name ) {
3636 case 'domain' :
3737 return 'interopio'
@@ -70,7 +70,7 @@ describe('action', () => {
7070
7171 it ( 'sets a failed status' , async ( ) => {
7272 // Set the action's inputs as return values from core.getInput()
73- getInputMock . mockImplementation ( ( name : string ) => {
73+ getInputMock . mockImplementation ( name => {
7474 switch ( name ) {
7575 case 'region' :
7676 return 'eu-central-1'
@@ -95,7 +95,7 @@ describe('action', () => {
9595
9696 it ( 'fails if no input is provided' , async ( ) => {
9797 // Set the action's inputs as return values from core.getInput()
98- getInputMock . mockImplementation ( ( name : string ) => {
98+ getInputMock . mockImplementation ( name => {
9999 switch ( name ) {
100100 case 'domain' :
101101 case 'domain-owner' :
0 commit comments