[UNSTABLE] Fix two tests. `render()` related, mostly
parent
b5f0d67a2e
commit
f06f01c837
|
@ -1,4 +1,5 @@
|
|||
jest.mock("farmbot-toastr", () => ({
|
||||
fun: jest.fn(),
|
||||
init: jest.fn(),
|
||||
success: jest.fn(),
|
||||
info: jest.fn(),
|
||||
|
|
|
@ -2,14 +2,14 @@ import * as React from "react";
|
|||
import { SyncButton } from "../sync_button";
|
||||
import { bot } from "../../__test_support__/fake_state/bot";
|
||||
import { defensiveClone } from "../../util";
|
||||
import { render } from "enzyme";
|
||||
import { shallow } from "enzyme";
|
||||
|
||||
const FAKE_BOT_STATE = defensiveClone(bot);
|
||||
|
||||
describe("<SyncButton/>", function () {
|
||||
it("renders nothing when not given a bot", function () {
|
||||
const dispatcher = jest.fn();
|
||||
const result = render(<SyncButton user={undefined}
|
||||
const result = shallow(<SyncButton user={undefined}
|
||||
dispatch={dispatcher}
|
||||
bot={FAKE_BOT_STATE} />);
|
||||
expect(result.hasClass("nav-sync")).toBeFalsy();
|
||||
|
|
Loading…
Reference in New Issue