MCPcopy Create free account
hub / github.com/gaearon/react-hot-loader / expectToBeDivStack

Function expectToBeDivStack

test/internal/getReactStack.test.js:52–59  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

50 expect(stack.instance).toBeInstanceOf(Root);
51 expect(stack.children).toHaveLength(2);
52 function expectToBeDivStack(child) {
53 expect(child.type).toBe(Div);
54 expect(child.instance.SFC_fake).toBe(Div);
55 expect(child.children).toHaveLength(1);
56 expect(child.children[0].type).toBe('div');
57 expect(child.children[0].instance).toBeDefined();
58 expect(child.children[0].children).toHaveLength(0);
59 }
60 expectToBeDivStack(stack.children[0]);
61 expectToBeDivStack(stack.children[1]);
62 });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected