fixed warnings on test execution

This commit is contained in:
Sebastian Sdorra
2018-07-18 14:02:07 +02:00
parent 12d71827b4
commit 2889c6598d
5 changed files with 67 additions and 26 deletions

View File

@@ -1,15 +1,11 @@
import React from "react";
import { configure, mount, shallow } from "enzyme";
import { mount, shallow } from "enzyme";
import "../../tests/enzyme";
import DeleteUserButton from "./DeleteUserButton";
import Adapter from "enzyme-adapter-react-16";
import { confirmAlert } from "../../components/ConfirmAlert";
jest.mock("../../components/ConfirmAlert");
import "raf/polyfill";
configure({ adapter: new Adapter() });
describe("DeleteUserButton", () => {
it("should render nothing, if the delete link is missing", () => {
const entry = {
@@ -38,9 +34,6 @@ describe("DeleteUserButton", () => {
const button = mount(
<DeleteUserButton entry={entry} deleteUser={() => {}} />
);
console.log(button);
expect(button.text()).not.toBe("");
});