Skip to content

Commit 35ceda6

Browse files
committed
updated helpers and time jump and tree
1 parent 3f993fc commit 35ceda6

File tree

5 files changed

+254
-237
lines changed

5 files changed

+254
-237
lines changed

src/backend/__tests__/helpers.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ describe('AST Unit Tests', () => {
5454
});
5555
});
5656

57+
58+
59+
// test notes
5760
describe('getHooksNames', () => {
5861
it('Should return object with one getter/setter for a single useState instance', () => {
5962
const elementType = `function SingleUseFakeComponent() {

src/backend/__tests__/timeJump.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ describe('unit testing for timeJump.ts', () => {
6565
timeJump = timeJumpRequire(mode);
6666
});
6767
test('calling the initial require should return a function', () => {
68-
expect(typeof timeJumpRequire).toBe('function');
68+
const funcDef = timeJumpRequire;
69+
expect(typeof funcDef).toBe('function');
6970
});
7071

7172
// xdescribe('testing iteration through snapshot tree', () => {

src/backend/__tests__/tree.test.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import Tree from '../tree';
22
import { networkInterfaces } from 'os';
33

4+
5+
6+
47
describe('Tree unit test', () => {
58
const newTree = new Tree({});
69

@@ -30,6 +33,8 @@ describe('Tree unit test', () => {
3033
});
3134

3235
/**
36+
*
37+
* making sure to adhere to ts practices when goign through tests
3338
*
3439
* ^^
3540
* the tree should have initial values of state,
@@ -62,9 +67,9 @@ describe('Tree unit test', () => {
6267
});
6368

6469
describe('Adding sibling', () => {
65-
let newTree = new Tree({});
66-
let returnChild = newTree.addChild('stateful', 'child', {}, null);
67-
let returnSibling = returnChild.addSibling('stateful', 'child', {}, null);
70+
// const newTree = new Tree({});
71+
const returnChild = newTree.addChild('stateful', 'child', {}, null);
72+
const returnSibling = returnChild.addSibling('stateful', 'child', {}, null);
6873

6974
it('the tree now has 2 children', () => {
7075
expect(newTree.children.length).toBe(2);
@@ -81,11 +86,17 @@ describe('Tree unit test', () => {
8186
})
8287
})
8388

89+
90+
91+
// review this test
92+
// returnSibling not used?
93+
// Check Test
94+
8495
describe('Copy & clean tree', () => {
85-
let newTree = new Tree({});
86-
let returnChild = newTree.addChild('stateful', 'child', {}, null);
87-
let returnSibling = returnChild.addSibling('stateful', 'child', {}, null);
88-
let copy = newTree.cleanTreeCopy();
96+
// const newTree = new Tree({});
97+
const returnChild = newTree.addChild('stateful', 'child', {}, null);
98+
const returnSibling = returnChild.addSibling('stateful', 'child', {}, null);
99+
const copy = newTree.cleanTreeCopy();
89100
it('its copy has 2 children', () => {
90101
expect(copy.children.length).toEqual(2);
91102
})

src/backend/timeJump.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import routes from './routes';
1717
*/
1818

1919
/* eslint-disable no-param-reassign */
20-
20+
// hookState store?
21+
// are lines 42 - 56 even needed??
22+
// add event listener yelling at us
2123
import componentActionsRecord from './masterState';
2224

2325
const circularComponentTable = new Set();

0 commit comments

Comments
 (0)