Skip to content

Remove spyon, use readable stream to test pipeResponseToFile - #651

Merged
hashtagchris merged 2 commits into
mainfrom
hashtagchris-test-pipeResponseToFile
Nov 30, 2020
Merged

Remove spyon, use readable stream to test pipeResponseToFile#651
hashtagchris merged 2 commits into
mainfrom
hashtagchris-test-pipeResponseToFile

Conversation

@hashtagchris

@hashtagchrishashtagchris commented Nov 26, 2020

Copy link
Copy Markdown
Contributor

Removing jest.spyOn(DownloadHttpClient.prototype, 'pipeResponseToFile') from the download artifact tests, and using a readable stream object to test pipeResponseToFile. Also verifying the destination file size on disk.

This is set up for a follow-up PR with new test cases for truncated responses, #652.

@yacaovsncyacaovsnc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding the check for file length.

@hashtagchris
hashtagchris merged commit ff43080 into mainNov 30, 2020
@hashtagchris
hashtagchris deleted the hashtagchris-test-pipeResponseToFile branch November 30, 2020 17:12
at-wat pushed a commit to at-wat/actions-toolkit that referenced this pull request Aug 31, 2023
…#651)
* Remove spyon, use readable stream to test pipeResponseToFile
* Check file contents
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hashtagchris@yacaovsnc