Skip to content

Commit db16634

Browse files
committed
small update
1 parent de8bbc6 commit db16634

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import React from 'react';
2-
import { configure, mount } from 'enzyme';
3-
import Adapter from 'enzyme-adapter-react-16';
4-
import ComponentMap from '../components/ComponentMap'
1+
52
import * as d3 from 'd3'
63

74
describe('canvas', ()=> {
@@ -13,4 +10,9 @@ describe('canvas', ()=> {
1310
it ('should exist', ()=>{
1411
expect(getCanvas()).not.toBeNull();
1512
})
13+
14+
it ('should have width of 900', ()=>{
15+
expect(getCanvas().width).toBe(900)
16+
})
17+
1618
})

src/app/__tests__/History.test.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,19 @@ describe('Life cycle methods in History', () => {
3131
index : 0,
3232
name : 1,
3333
stateSnapshot : {
34-
children:[{}],
34+
children:[
35+
{
36+
children: [],
37+
componentData: {
38+
actualDuration : 1.0,
39+
actualStartTime : 1.0,
40+
selfBaseDuration : 1.0,
41+
treeBaseDuration : 1.0,
42+
},
43+
name: 'root',
44+
state: 'stateless'
45+
}
46+
],
3547
componentData: {},
3648
name: "root",
3749
state: "root"
@@ -40,6 +52,7 @@ describe('Life cycle methods in History', () => {
4052
};
4153
// Set up wrapper
4254
beforeEach(() => {
55+
console.log(props)
4356
wrapper = mount(<History {...props} />);
4457
});
4558
// test componentDidMount

src/app/components/History.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const filterHooks = (data: any[]) => {
3131
};
3232

3333
interface HistoryProps {
34-
hierarchy: Record<string, unknown>;
34+
hierarchy:any;
3535
}
3636

3737
let root = {};

0 commit comments

Comments
 (0)