chore(test): fix type mismatch
This commit is contained in:
parent
fae37128f7
commit
0ce4b39a53
4 changed files with 28 additions and 16 deletions
|
@ -36,10 +36,13 @@ describe("imprint.tsx", () => {
|
|||
// @ts-ignore
|
||||
delete window.location;
|
||||
|
||||
window.location = {
|
||||
...location,
|
||||
reload: jest.fn(),
|
||||
};
|
||||
Object.defineProperty(window, "location", {
|
||||
configurable: true,
|
||||
value: {
|
||||
...window.location,
|
||||
reload: jest.fn(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("Tests Imprint", () => {
|
||||
|
|
|
@ -48,10 +48,13 @@ describe("searchBar.tsx", () => {
|
|||
// @ts-ignore
|
||||
delete window.location;
|
||||
|
||||
window.location = {
|
||||
...location,
|
||||
reload: jest.fn(),
|
||||
};
|
||||
Object.defineProperty(window, "location", {
|
||||
configurable: true,
|
||||
value: {
|
||||
...window.location,
|
||||
reload: jest.fn(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("Tests SearchBar rendering with properties", () => {
|
||||
|
|
|
@ -78,10 +78,13 @@ describe("settings.tsx", () => {
|
|||
// @ts-ignore
|
||||
delete window.location;
|
||||
|
||||
window.location = {
|
||||
...location,
|
||||
reload: jest.fn(),
|
||||
};
|
||||
Object.defineProperty(window, "location", {
|
||||
configurable: true,
|
||||
value: {
|
||||
...window.location,
|
||||
reload: jest.fn(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("Tests forms", () => {
|
||||
|
|
|
@ -21,10 +21,13 @@ const setup = () => {
|
|||
// @ts-ignore
|
||||
delete window.location;
|
||||
|
||||
window.location = {
|
||||
...location,
|
||||
reload: jest.fn(),
|
||||
};
|
||||
Object.defineProperty(window, "location", {
|
||||
configurable: true,
|
||||
value: {
|
||||
...window.location,
|
||||
reload: jest.fn(),
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
describe("theme.tsx", () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue