mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Remove traverse-edge testcase file
Didn't make much sense
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
// import * as React from "react";
|
|
||||||
|
|
||||||
// Import stuff from src
|
|
||||||
import { traverse } from "../src";
|
|
||||||
|
|
||||||
// Import test helpers and sample components
|
|
||||||
import { mountAndGetRootNode } from "./utils/mountInEnzyme";
|
|
||||||
|
|
||||||
describe("traverse", () => {
|
|
||||||
let container: HTMLDivElement;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
container = document.body.appendChild(document.createElement("div"));
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
document.body.removeChild(container);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("edge cases", () => {
|
|
||||||
it("should work for string nodes", () => {
|
|
||||||
const rootNode = mountAndGetRootNode('div', container);
|
|
||||||
const mockCallback = jest.fn();
|
|
||||||
|
|
||||||
traverse(rootNode, mockCallback);
|
|
||||||
|
|
||||||
// Can't be zero, in any case
|
|
||||||
expect(mockCallback.mock.calls.length).not.toBe(0);
|
|
||||||
expect(mockCallback.mock.calls.length).toBe(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user