Skip to content

Commit

Permalink
Update tests to handle target=_blank
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Jan 2, 2024
1 parent 04ae201 commit cb6a247
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe("Testing Client", () => {
ClientFunctions.downloadUrl(testBlobUrl, testFileName)

expect(createElementSpy).toBeCalledWith('a');
expect(mLink.setAttribute.mock.calls.length).toBe(2);
expect(mLink.setAttribute.mock.calls.length).toBe(3);
expect(mLink.setAttribute.mock.calls[0]).toEqual(['href', testBlobUrl]);
expect(mLink.setAttribute.mock.calls[1]).toEqual(['download', testFileName]);
expect(mLink.style.display).toBe('none');
Expand All @@ -124,7 +124,7 @@ describe("Testing Client", () => {
ClientFunctions.downloadUrl(testBlobUrl)

expect(createElementSpy).toBeCalledWith('a');
expect(mLink.setAttribute.mock.calls.length).toBe(2);
expect(mLink.setAttribute.mock.calls.length).toBe(3);
expect(mLink.setAttribute.mock.calls[0]).toEqual(['href', testBlobUrl]);
expect(mLink.setAttribute.mock.calls[1]).toEqual(['download', '']);
expect(mLink.style.display).toBe('none');
Expand Down

0 comments on commit cb6a247

Please sign in to comment.