1 import TreeNode from 'generic-components/treeNode/TreeNode';
2 import React from 'react';
3 import { mount } from 'enzyme';
5 describe('TreeNode', () => {
9 treeNode = mount(<TreeNode node={{title: 'AAA'}}/>).instance();
13 it('Should be invisible when created', () => {
15 expect(treeNode.state['visible']).toEqual(false)
18 it('Should be visible when toggled', () => {
20 expect(treeNode.state['visible']).toEqual(false)
26 expect(treeNode.state['visible']).toEqual(true)
29 it('Should be invisible when double toggled', () => {
31 expect(treeNode.state['visible']).toEqual(false);
38 expect(treeNode.state['visible']).toEqual(false);