mirror of
https://github.com/actions/checkout.git
synced 2025-04-19 00:56:45 +00:00
update dev dependencies and react to new linting rules (#611)
This commit is contained in:
parent
c49af7ca1f
commit
eb8a193c1d
16 changed files with 14807 additions and 4534 deletions
|
@ -417,7 +417,7 @@ describe('git-auth-helper tests', () => {
|
|||
`Did not expect file to exist: '${globalGitConfigPath}'`
|
||||
)
|
||||
} catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
if ((err as any)?.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
@ -601,7 +601,7 @@ describe('git-auth-helper tests', () => {
|
|||
await fs.promises.stat(actualKeyPath)
|
||||
throw new Error('SSH key should have been deleted')
|
||||
} catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
if ((err as any)?.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ describe('git-auth-helper tests', () => {
|
|||
await fs.promises.stat(actualKnownHostsPath)
|
||||
throw new Error('SSH known hosts should have been deleted')
|
||||
} catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
if ((err as any)?.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ describe('git-auth-helper tests', () => {
|
|||
await fs.promises.stat(homeOverride)
|
||||
throw new Error(`Should have been deleted '${homeOverride}'`)
|
||||
} catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
if ((err as any)?.code !== 'ENOENT') {
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('ref-helper tests', () => {
|
|||
await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit)
|
||||
throw new Error('Should not reach here')
|
||||
} catch (err) {
|
||||
expect(err.message).toBe('Arg git cannot be empty')
|
||||
expect((err as any)?.message).toBe('Arg git cannot be empty')
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -25,7 +25,9 @@ describe('ref-helper tests', () => {
|
|||
await refHelper.getCheckoutInfo(git, '', '')
|
||||
throw new Error('Should not reach here')
|
||||
} catch (err) {
|
||||
expect(err.message).toBe('Args ref and commit cannot both be empty')
|
||||
expect((err as any)?.message).toBe(
|
||||
'Args ref and commit cannot both be empty'
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -102,7 +104,7 @@ describe('ref-helper tests', () => {
|
|||
await refHelper.getCheckoutInfo(git, 'my-ref', '')
|
||||
throw new Error('Should not reach here')
|
||||
} catch (err) {
|
||||
expect(err.message).toBe(
|
||||
expect((err as any)?.message).toBe(
|
||||
"A branch or tag with the name 'my-ref' could not be found"
|
||||
)
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ describe('retry-helper tests', () => {
|
|||
throw new Error(`some error ${++attempts}`)
|
||||
})
|
||||
} catch (err) {
|
||||
error = err
|
||||
error = err as Error
|
||||
}
|
||||
expect(error.message).toBe('some error 3')
|
||||
expect(attempts).toBe(3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue