@@ -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- */
0 commit comments