mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-20 15:42:36 +08:00
Pass in the directory for hashFiles (#1318)
This commit is contained in:
@@ -51,6 +51,7 @@ describe('globber', () => {
|
||||
)
|
||||
})
|
||||
|
||||
const emptyDirectory = ''
|
||||
it('followSymbolicLinks set to true', async () => {
|
||||
const root = path.join(getTestTemp(), 'set-to-true')
|
||||
await fs.mkdir(path.join(root, 'realdir'), {recursive: true})
|
||||
@@ -60,7 +61,9 @@ describe('globber', () => {
|
||||
path.join(root, 'symDir')
|
||||
)
|
||||
const testPath = path.join(root, `symDir`)
|
||||
const hash = await hashFiles(testPath, {followSymbolicLinks: true})
|
||||
const hash = await hashFiles(testPath, emptyDirectory, {
|
||||
followSymbolicLinks: true
|
||||
})
|
||||
expect(hash).toEqual(
|
||||
'd8a411e8f8643821bed189e627ff57151918aa554c00c10b31c693ab2dded273'
|
||||
)
|
||||
@@ -80,7 +83,9 @@ describe('globber', () => {
|
||||
path.join(root, 'symDir')
|
||||
)
|
||||
const testPath = path.join(root, 'symdir')
|
||||
const hash = await hashFiles(testPath, {followSymbolicLinks: false})
|
||||
const hash = await hashFiles(testPath, emptyDirectory, {
|
||||
followSymbolicLinks: false
|
||||
})
|
||||
expect(hash).toEqual('')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user