Skip to content

Commit 612234e

Browse files
committed
index.test.js
1 parent 11ef887 commit 612234e

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

dev-reactime/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-reactime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "reactime",
2+
"name": "dev-reactime",
33
"version": "4.0.0",
44
"description": "A library that helps debug React by memorizing the state of components with every render.",
55
"main": "index.js",

src/app/__tests__/actionContainer.test.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,43 @@ const state = {
1414
tabs: {
1515
87: {
1616
snapshots: [1, 2, 3, 4],
17+
hierarchy: {
18+
index: 0,
19+
name: 1,
20+
branch: 0,
21+
stateSnapshot: {
22+
state: {},
23+
children: [],
24+
},
25+
children: [{
26+
index: 1,
27+
name: 2,
28+
branch: 0,
29+
stateSnapshot: {
30+
state: {},
31+
children: [],
32+
},
33+
children: [{
34+
index: 2,
35+
name: 3,
36+
branch: 0,
37+
stateSnapshot: {
38+
state: {},
39+
children: [],
40+
},
41+
children: [{
42+
index: 3,
43+
name: 4,
44+
branch: 0,
45+
stateSnapshot: {
46+
state: {},
47+
children: [],
48+
},
49+
children: [],
50+
}]
51+
}]
52+
}]
53+
},
1754
sliderIndex: 0,
1855
viewIndex: -1,
1956
},
@@ -46,5 +83,6 @@ describe('testing the emptySnapshot button', () => {
4683
});
4784

4885
test('number of actions should reflect snapshots array', () => {
86+
console.log(wrapper)
4987
expect(wrapper.find(Action).length).toBe(state.tabs[state.currentTab].snapshots.length);
5088
});

src/app/__tests__/index.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './components/App';
4+
5+
it('renders without crashing', () => {
6+
ReactDOM.render(<App />, document.getElementById('root'));
7+
})

src/app/containers/ActionContainer.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const resetSlider = () => {
1515
function ActionContainer() {
1616
const [{ tabs, currentTab }, dispatch] = useStoreContext();
1717
const { hierarchy, sliderIndex, viewIndex } = tabs[currentTab];
18+
console.log(tabs[currentTab])
1819
let actionsArr = [];
1920
const hierarchyArr = [];
2021

0 commit comments

Comments
 (0)