Skip to content

Commit 77c9751

Browse files
committed
clean up comments
1 parent 5afab8c commit 77c9751

File tree

10 files changed

+10
-89
lines changed

10 files changed

+10
-89
lines changed

src/app/__tests__/MainSlider.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
/* eslint-disable react/jsx-props-no-spreading */
23
import { shallow, configure } from 'enzyme';
34
import React from 'react';
@@ -8,7 +9,7 @@ import MainSlider from '../components/MainSlider';
89

910
import { useStoreContext } from '../store';
1011

11-
configure({ adapter: new Adapter() });
12+
configure({ adapter: new (Adapter as any)() });
1213

1314
jest.mock('../store');
1415
// the handle function in MainSlider returns out a Tooltip Component

src/app/__tests__/SwitchApp.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import React from 'react';
23
import Select from 'react-select';
34
import { configure, shallow } from 'enzyme';
@@ -6,7 +7,7 @@ import SwitchApp from '../components/SwitchApp';
67

78
import { useStoreContext } from '../store';
89

9-
configure({ adapter: new Adapter() });
10+
configure({ adapter: new (Adapter as any)() });
1011

1112
jest.mock('../store');
1213

src/app/__tests__/TravelContainer.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
/* eslint-disable react/jsx-filename-extension */
23
import { shallow, configure } from 'enzyme';
34
import React from 'react';
@@ -8,7 +9,7 @@ import Dropdown from '../components/Dropdown';
89
import { useStoreContext } from '../store';
910
import { moveBackward, moveForward } from '../actions/actions';
1011

11-
configure({ adapter: new Adapter() });
12+
configure({ adapter: new (Adapter as any)() });
1213

1314
const state = {
1415
tabs: {

src/app/reducers/mainReducer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable no-restricted-syntax */
2+
/* eslint-disable prefer-const */
13
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
24
/* eslint-disable no-param-reassign */
35
import produce from 'immer';
@@ -24,14 +26,12 @@ export default (state, action) => produce(state, draft => {
2426
}
2527

2628
const objChildArray = [];
27-
// eslint-disable-next-line no-restricted-syntax
2829
if (obj) {
29-
for (const objChild of obj.children) {
30+
for (let objChild of obj.children) {
3031
objChildArray.push(findName(index, objChild));
3132
}
3233
}
33-
// eslint-disable-next-line no-restricted-syntax
34-
for (const objChildName of objChildArray) {
34+
for (let objChildName of objChildArray) {
3535
if (objChildName) {
3636
return objChildName;
3737
}

src/backend/__tests__/astParser.test.js

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -57,69 +57,3 @@ describe('AST Unit Tests', () => {
5757
});
5858
});
5959
});
60-
61-
/* /*
62-
console.log('getHooksNames: ', getHooksNames(`function LastSnapshot(props) {
63-
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(''),
64-
_useState2 = _slicedToArray(_useState, 2),
65-
currentSnapshot = _useState2[0],
66-
setCurrentSnapshot = _useState2[1];
67-
68-
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(25),
69-
_useState4 = _slicedToArray(_useState3, 2),
70-
testState = _useState4[0],
71-
setTestState = _useState4[1];
72-
73-
var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(50),
74-
_useState6 = _slicedToArray(_useState5, 2),
75-
testState2 = _useState6[0],
76-
setTestState2 = _useState6[1];
77-
78-
function replacer(name, val) {
79-
// Ignore the key that is the name of the state variable
80-
if (name === 'currentSnapshot') {
81-
console.log('filtering currentSnapshot from display');
82-
return undefined;
83-
}
84-
85-
return val;
86-
}
87-
88-
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
89-
window.addEventListener('message', function (_ref) {
90-
var _ref$data = _ref.data,
91-
action = _ref$data.action,
92-
payload = _ref$data.payload;
93-
94-
if (action === 'recordSnap') {
95-
console.log('stringifying payload:', payload);
96-
var payloadContent = JSON.stringify(payload, replacer, 1);
97-
setCurrentSnapshot(payloadContent);
98-
setTestState(function (state) {
99-
return state * 2;
100-
});
101-
setTestState2(function (state) {
102-
return state * 2;
103-
});
104-
console.log('current snapshot', currentSnapshot);
105-
}
106-
});
107-
}, []);
108-
/*
109-
// This method is for testing. Setting state after the activeSandbox is changed modifies the overall behavior of the sandbox environment.
110-
const { activeSandbox } = props;
111-
useEffect(() => {
112-
// Reset the current snapshot when a new sandbox is entered
113-
setCurrentSnapshot('');
114-
}, [activeSandbox]);
115-
*/
116-
/*
117-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
118-
id: "lastSnapshot",
119-
className: "ml-5 mt-2",
120-
style: {
121-
whiteSpace: 'pre'
122-
}
123-
}, testState, testState2, currentSnapshot));
124-
};`));
125-
*/

src/backend/__tests__/puppeteerServer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ const app = express();
99
app.use(express.static(path.resolve(__dirname)));
1010

1111
const server = app.listen(5000);
12-
// () => {console.log('Express listening on port 5000');}
1312

1413
module.exports = server;

src/backend/linkFiber.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,5 @@ export default (snap: Snapshot, mode: Mode): ()=>void => {
252252
}
253253

254254
throttledUpdateSnapshot();
255-
256-
// updateSnapShotTree();
257-
// Send the initial snapshot once the content script has started up
258-
// This message is sent from contentScript.js in chrome extension bundles
259-
// window.addEventListener('message', ({ data: { action } }) => {
260-
// if (action === 'contentScriptStarted') {
261-
// // console.log('content script started received at linkFiber.js')
262-
// sendSnapshot();
263-
// }
264-
// });
265255
};
266256
};

src/backend/puppeteerServer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ const app = express();
99
app.use(express.static(path.resolve(__dirname)));
1010

1111
const server = app.listen(5000);
12-
// () => {console.log('Express listening on port 5000');}
1312

1413
module.exports = server;

tests/automated-tests/Backend/server.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ const app = express();
66
app.use(express.static(path.resolve(__dirname, '../', 'Frontend', 'public')));
77

88
const server = app.listen(3000);
9-
// () => {console.log('Express listening on port 3000');}
109

1110
module.exports = server;

tests/automated-tests/hooks-redux-router/Frontend/src/scenes/lastSnapshot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const LastSnapshot = props => {
1616
function replacer(name, val) {
1717
// Ignore the key that is the name of the state variable
1818
if (name === 'currentSnapshot') {
19-
console.log('filtering currentSnapshot from display');
2019
return undefined;
2120
}
2221

@@ -26,12 +25,10 @@ const LastSnapshot = props => {
2625
useEffect(() => {
2726
window.addEventListener('message', ({ data: { action, payload } }) => {
2827
if (action === 'recordSnap') {
29-
console.log('stringifying payload:', payload);
3028
const payloadContent = JSON.stringify(payload, replacer, 1);
3129
setCurrentSnapshot(payloadContent);
3230
setTestState((state) => state*2);
3331
setTestState2((state) => state*2);
34-
console.log('current snapshot', currentSnapshot);
3532
}
3633
});
3734
}, []);

0 commit comments

Comments
 (0)