mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1573408
- Restore mock in jest tests r=Ola,sole
Differential Revision: https://phabricator.services.mozilla.com/D41982 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5f76ecca6e
commit
e3e7c0ffca
@ -7,8 +7,6 @@
|
||||
const { shallow } = require("enzyme");
|
||||
const { createFactory } = require("react");
|
||||
|
||||
console.error = jest.fn();
|
||||
|
||||
// Import setupStore with imported & combined reducers
|
||||
const {
|
||||
setupStore,
|
||||
@ -35,10 +33,18 @@ describe("PageSwitcher", () => {
|
||||
});
|
||||
}
|
||||
|
||||
const consoleErrorSpy = jest
|
||||
.spyOn(console, "error")
|
||||
.mockImplementation(() => {});
|
||||
|
||||
beforeEach(() => {
|
||||
console.error.mockClear();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
consoleErrorSpy.mockRestore();
|
||||
});
|
||||
|
||||
it("renders the ManifestPage component when manifest page is selected", () => {
|
||||
const store = buildStoreWithSelectedPage(PAGE_TYPES.MANIFEST);
|
||||
const wrapper = shallow(PageSwitcher({ store })).dive();
|
||||
|
Loading…
Reference in New Issue
Block a user