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:
parent
6ebf19c0c9
commit
f7fa3f7c09
|
@ -37,8 +37,8 @@ module.exports = {
|
||||||
global: {
|
global: {
|
||||||
branches: 25,
|
branches: 25,
|
||||||
functions: 25,
|
functions: 25,
|
||||||
lines: 29.5,
|
lines: 29,
|
||||||
statements: 29.5,
|
statements: 29,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe("GalleryUtils", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("downloadItem shows dialog in data explorer", () => {
|
it("downloadItem shows dialog in data explorer", () => {
|
||||||
const container = {} as Explorer;
|
const container = new Explorer();
|
||||||
GalleryUtils.downloadItem(container, undefined, galleryItem, undefined);
|
GalleryUtils.downloadItem(container, undefined, galleryItem, undefined);
|
||||||
|
|
||||||
expect(useDialog.getState().visible).toBe(true);
|
expect(useDialog.getState().visible).toBe(true);
|
||||||
|
|
Loading…
Reference in New Issue