Check for 0 sized artifact lists

This commit is contained in:
Daniel Kennedy
2026-02-24 12:21:35 -05:00
parent d584ea9caa
commit 7396e85e4a
2 changed files with 15 additions and 0 deletions
@@ -373,6 +373,17 @@ describe('upload-artifact', () => {
})
describe('skipArchive option', () => {
it('should throw an error if skipArchive is true and files array is empty', async () => {
const uploadResp = uploadArtifact(
fixtures.inputs.artifactName,
[],
fixtures.inputs.rootDirectory,
{skipArchive: true}
)
await expect(uploadResp).rejects.toThrow(FilesNotFoundError)
})
it('should throw an error if skipArchive is true and multiple files are provided', async () => {
const uploadResp = uploadArtifact(
fixtures.inputs.artifactName,