mirror of
https://github.com/actions/checkout.git
synced 2025-04-20 09:36:45 +00:00
Run format, lint and build
Signed-off-by: Luca Comellini <luca.com@gmail.com>
This commit is contained in:
parent
44c2b7a8a4
commit
b260373e81
9 changed files with 9720 additions and 29471 deletions
|
@ -169,9 +169,8 @@ describe('git-auth-helper tests', () => {
|
|||
|
||||
// Mock fs.promises.readFile
|
||||
const realReadFile = fs.promises.readFile
|
||||
jest
|
||||
.spyOn(fs.promises, 'readFile')
|
||||
.mockImplementation(async (file: any, options: any): Promise<Buffer> => {
|
||||
jest.spyOn(fs.promises, 'readFile').mockImplementation(
|
||||
async (file: any, options: any): Promise<Buffer> => {
|
||||
const userKnownHostsPath = path.join(
|
||||
os.homedir(),
|
||||
'.ssh',
|
||||
|
@ -182,7 +181,8 @@ describe('git-auth-helper tests', () => {
|
|||
}
|
||||
|
||||
return await realReadFile(file, options)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
// Act
|
||||
const authHelper = gitAuthHelper.createAuthHelper(git, settings)
|
||||
|
|
|
@ -7,11 +7,11 @@ let git: IGitCommandManager
|
|||
|
||||
describe('ref-helper tests', () => {
|
||||
beforeEach(() => {
|
||||
git = {} as unknown as IGitCommandManager
|
||||
git = ({} as unknown) as IGitCommandManager
|
||||
})
|
||||
|
||||
it('getCheckoutInfo requires git', async () => {
|
||||
const git = null as unknown as IGitCommandManager
|
||||
const git = (null as unknown) as IGitCommandManager
|
||||
try {
|
||||
await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit)
|
||||
throw new Error('Should not reach here')
|
||||
|
|
|
@ -68,7 +68,7 @@ describe('retry-helper tests', () => {
|
|||
|
||||
it('all attempts fail succeeds', async () => {
|
||||
let attempts = 0
|
||||
let error: Error = null as unknown as Error
|
||||
let error: Error = (null as unknown) as Error
|
||||
try {
|
||||
await retryHelper.execute(() => {
|
||||
throw new Error(`some error ${++attempts}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue