mirror of
https://code.forgejo.org/actions/upload-artifact.git
synced 2025-05-19 15:44:46 +00:00
Warn excluded hidden files
This commit is contained in:
parent
6027e3dd17
commit
ac7ab52308
2 changed files with 28 additions and 1 deletions
|
@ -386,6 +386,7 @@ describe('Search', () => {
|
|||
})
|
||||
|
||||
it('Hidden files ignored by default', async () => {
|
||||
const warningSpy = jest.spyOn(core, 'warning')
|
||||
const searchPath = path.join(root, '**/*')
|
||||
const searchResult = await findFilesToUpload(searchPath)
|
||||
|
||||
|
@ -394,14 +395,19 @@ describe('Search', () => {
|
|||
expect(searchResult.filesToUpload).not.toContain(
|
||||
fileInHiddenFolderInFolderA
|
||||
)
|
||||
expect(warningSpy).toHaveBeenCalledWith(
|
||||
expect.stringMatching(/Set include-hidden-files to true to include these files.$/)
|
||||
)
|
||||
})
|
||||
|
||||
it('Hidden files included', async () => {
|
||||
const warningSpy = jest.spyOn(core, 'warning')
|
||||
const searchPath = path.join(root, '**/*')
|
||||
const searchResult = await findFilesToUpload(searchPath, true)
|
||||
|
||||
expect(searchResult.filesToUpload).toContain(hiddenFile)
|
||||
expect(searchResult.filesToUpload).toContain(fileInHiddenFolderPath)
|
||||
expect(searchResult.filesToUpload).toContain(fileInHiddenFolderInFolderA)
|
||||
expect(warningSpy).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue