Fix Unit Test: Mock the class to its instance (#1117)

* mock to instance

* Update jest.config.js

Co-authored-by: Jordi Bunster <jbunster@microsoft.com>
This commit is contained in:
Karthik chakravarthy
2021-10-05 16:06:26 -04:00
committed by GitHub
parent 6ebf19c0c9
commit f7fa3f7c09
2 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ describe("GalleryUtils", () => {
});
it("downloadItem shows dialog in data explorer", () => {
const container = {} as Explorer;
const container = new Explorer();
GalleryUtils.downloadItem(container, undefined, galleryItem, undefined);
expect(useDialog.getState().visible).toBe(true);