Skip to content

Commit adecc87

Browse files
committed
Update FileDownloader test.
1 parent 9e8db90 commit adecc87

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unitTests/Packages/FileDownloader.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ suite("FileDownloader", () => {
9393

9494
suite('If the response status code is not 301, 302 or 200 then the download fails', () => {
9595
test('Error is thrown', async () => {
96-
expect(DownloadFile(fileDescription, eventStream, networkSettingsProvider, getURL(errorUrlPath))).be.rejected;
96+
const downloadPromise = DownloadFile(fileDescription, eventStream, networkSettingsProvider, getURL(errorUrlPath));
97+
try {
98+
await downloadPromise;
99+
}
100+
catch { }
101+
expect(downloadPromise).be.rejected;
97102
});
98103

99104
test('Download Start and Download Failure events are created', async () => {

0 commit comments

Comments
 (0)